C
catharticmomentusenet
Hi,
Our software currently uses access to store a large amount of read-only
configuration information. The program is written .NET and uses JET to
connect to an access database.
Our testers have recently reported that our software fails to open the
database when it is run with restricted user rights. I have discovered
that this occurs due to the program not having sufficient access rights
to create an LDB file in the directory containing our database (which
is under program files).
We would like restricted users to be able to use our program. It seems
to me that this is probably quite a common requirement. Have other
developers encountered the same issue? Is there a standard workaround?
I can think of a couple of possible options myself, but neither are
ideal:
i) Copy the database to a hidden file in the user's temporary directory
and open it from there.
Problem: What happens if multiple instances of our application are run?
Does each copy it's own instance of the database, or do we try to
implement our own reference counting schema. This approach seems like a
'hack'.
ii) Upon installing our software, create a new user account with
appropriate privileges for opening the database. Move all database code
into a separate COM server which runs as the specially created user
account.
Problem: This approach seems overly complex, and may consume a week or
two of developer time.
regards,
Chris
P.S. The error I get from opening the database is "Could not lock
file".
Our software currently uses access to store a large amount of read-only
configuration information. The program is written .NET and uses JET to
connect to an access database.
Our testers have recently reported that our software fails to open the
database when it is run with restricted user rights. I have discovered
that this occurs due to the program not having sufficient access rights
to create an LDB file in the directory containing our database (which
is under program files).
We would like restricted users to be able to use our program. It seems
to me that this is probably quite a common requirement. Have other
developers encountered the same issue? Is there a standard workaround?
I can think of a couple of possible options myself, but neither are
ideal:
i) Copy the database to a hidden file in the user's temporary directory
and open it from there.
Problem: What happens if multiple instances of our application are run?
Does each copy it's own instance of the database, or do we try to
implement our own reference counting schema. This approach seems like a
'hack'.
ii) Upon installing our software, create a new user account with
appropriate privileges for opening the database. Move all database code
into a separate COM server which runs as the specially created user
account.
Problem: This approach seems overly complex, and may consume a week or
two of developer time.
regards,
Chris
P.S. The error I get from opening the database is "Could not lock
file".