Saving design changes in Access 2000 locks out ADO, why?

  • Thread starter Thread starter Michael Edwards
  • Start date Start date
M

Michael Edwards

I have Access 2000 with some DAO and some ADO code. If I make any design
changes and save them, I must close and re-open the database to run any ADO
code. Otherwise I get the following message:

"The database has been placed in a state by user 'Admin' on machine 'X' that
prevents it from being opened or locked."

Is this normal? Is there a work around?
 
Saving design changes means that you have an exclusive lock on the whole
database. No 'other person' can connect to the database until you release
the exclusive lock. The only way to release the exclusive lock is to
close the database.

The only way to work around this with ADO is to make sure that you are
using the SAME CONNECTION, not creating a new connection.

You can get the current connection object from
Application.CurrentProject.Connection

(The default property of the object is the ConnectionString: don't
confuse that with the connection object)

(david)
 
Back
Top