The database has been placed in a state by user 'admin' on machine '1280-DEV1' that prevents it from

  • Thread starter Thread starter Dan D
  • Start date Start date
D

Dan D

I dont seem to be able to open an ado connection from within the database
using ADO

Here is the code

Set m_cn = New ADODB.Connection
m_cn.ConnectionString = CurrentProject.BaseConnectionString
m_cn.Open , "admin", "mypassword"

I get the following error

The database has been placed in a state by user 'admin' on machine
'1280-DEV1' that prevents it from being opened or locked.

I am the only one in the database. So basically it has to be open for the
code to run but it cant open any of the tables because its already open.

ANy ideas?
 
Dan D said:
I dont seem to be able to open an ado connection from within the
database using ADO

Here is the code

Set m_cn = New ADODB.Connection
m_cn.ConnectionString = CurrentProject.BaseConnectionString
m_cn.Open , "admin", "mypassword"

I get the following error

The database has been placed in a state by user 'admin' on machine
'1280-DEV1' that prevents it from being opened or locked.

I am the only one in the database. So basically it has to be open
for the code to run but it cant open any of the tables because its
already open.

ANy ideas?

Don't open a new connection to the database, use the one that Access is
already using:

Dim m_cn As ADODB.Connection

Set m_cn = CurrentProject.Connection
 
Back
Top