Link to home
Start Free TrialLog in
Avatar of santama
santama

asked on

Limiting DAO Access

I have an Access database from where users need to access information. They do not need to append or edit any information, only read it. I wrote a program using CDaoRecordset for the users to retrieve the information.

The problem is that if I set the mdb file as read only so that users can't delete, add or change the records, the
Open() member function responds "... Cannot open file ...It is already open exclusively by another user."

Only if I give the users read and write access does the program work. But I don't want people to be able to change the database, i.e. with MS Access for example.

Is there a way to do this and get rid of that message.
ASKER CERTIFIED SOLUTION
Avatar of Tommy Hui
Tommy Hui

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of santama
santama

ASKER

I'm using the following code, and I get the same message.:


Records.Open(dbOpenDynaset, NULL, dbReadOnly);

Where Records is a CDaoRecordset Object.