Detecting Read-Only

  • Thread starter Thread starter Rand E. Gerald
  • Start date Start date
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.
 
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
 
Back
Top