How does dbReadOnly option work ?

S

S.L.

I use AccessXP in .mdb format.

OpenRecordset method in Access help file, It explains "dbReadOnly Prevents
users from making changes to the Recordset (Microsoft Jet only). ...".

1) Who does it prevent ? the user who currently run this code Or other
processes ?

If it is first case : It not make sense. Why the programmer have to prevent
himself ? He write the code. He knows whether he want to update or not to.

If it is second case : There is already dbDenyRead option to do that. I
don't think there are 2 options that do the same thing.

2) In addition, I still not understand how dbDenyRead and dbDenyWrite work ?

I test with my small code. I set Tools>Option> select [Record-level locking]
and [Edited record]. It works different from what I expect.
dbDenyWrite locks not only record-level but all records. While dbDenyRead
doesn't prevent other process from reading the same record.

Could you please explain ?
TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top