Open database Exclusive

N

Norm

Hi,

I hope this is the right group. I have a VB program that opens an Access
database and was wondering if I open it in Exclusive mode will any other
users that try to open it get an error code? If so does anyone know what the
error number would be or should I just trap all errors.

I am assuming that when open in Exclusive mode it would be locked to prevent
any other changes done to the database until closed.

I am trying to avoid the left over .ldb files when someone closes the
program improperly.

Thanks,
Norm

--
Norm

Don't blame me, my programming is
self-taught and my teacher was not
very experienced. :)

normfowler_don't (e-mail address removed)
 
A

Arvin Meyer [MVP]

The error most often raised would probably be 3051. Another one might be
3006.

I would just use an error handler like:

Error_Handler:

MsgBox "Another user has exclusively open the database. Please try
later", vbOKOnly, "Error"
DoCmd.Quit
 
N

Norm

Arvin said:
The error most often raised would probably be 3051. Another one might
be 3006.

I would just use an error handler like:

Error_Handler:

MsgBox "Another user has exclusively open the database. Please try
later", vbOKOnly, "Error"
DoCmd.Quit

Thanks very much Arvin.

--
Norm

Don't blame me, my programming is
self-taught and my teacher was not
very experienced. :)

normfowler_don't (e-mail address removed)
 

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