Detecting Read-Only

R

Rand E. Gerald

I have an application with which the users generate
reports from a CD containing an Access database. Is there
a way (method) to detect whether an Access database is
installed on a read-only device. That way I can disable
certain operations (such as updating the data) which are
inappropriate on a read-only device.
 
T

TC

Rand E. Gerald said:
I have an application with which the users generate
reports from a CD containing an Access database. Is there
a way (method) to detect whether an Access database is
installed on a read-only device. That way I can disable
certain operations (such as updating the data) which are
inappropriate on a read-only device.

I have code that automatically enables or disables Add/Edit/Delete buttons
on any form, depending on the current user's add/edit/delete access to the
underlying table(s). This is done by examining the AllPermissions property
of the relevant User object.

However, I just noticed recently, that the user-level permissions (as
exposed through the AllPermissions property) are *not* updated to say
"read-only", when you make the database file read-only! So they are probably
also not updated when the file is on a read-only device.

In other words, do not bother checking AllPermissions!

HTH,
TC
 

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