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

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?
 
D

Dirk Goldgar

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
 

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