Is the db Read-Only?

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
 
A

Alex Dybenko

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

John Nurick

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.
 
L

Leif

I found the currentdb.updatable property. That seems to
be the ticket. Thanks.

Leif
 

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