Is the db Read-Only?

  • Thread starter Thread starter Leif
  • Start date Start date
L

Leif

Does anyone know of a way to check if an A2000 database to
see if it is in a read-only state? I did write a routine
to check the MDB file attribute. However, I don't think
that handles the case where the file does not have its
read-only attribute set, but that group permissions make
it read-only to the user.

Thanks,
Leif
 
Try to make any update operation, for example update database property, if
fails - then db is readonly
 
Hi Leif,

It depends what you mean by read-only. Any of the following can prevent
a user from changing a database:
- file "read-only" attribute
- file system permissions
- Access user-level security permissions (which may mean
some objects in the database can be "read-only" but not others)
- file is on a non-writable disk even though the read-only
attribute is clear.

AFAIK the only simple way to catch all of these is to attempt to modify
the object of interest and trap the resulting error.
 
Back
Top