Open ADODB.Connection to already open Database

yeatmanj

Loose Cannon
Local time
Today, 08:26
Joined
Oct 11, 2000
Messages
195
There are two DBs. We'll say DB1 and DB2.

DB1 is always open. DB2 has a macro that I want to be able to access (using ADO) information in DB1. I keep getting this message that the Admin has the requested object (DB1) in a state that will not allow the new connection. Is there a certain syntax or command that I should be using to make the connection to the open database (DB1). My current connection statement is as follows:

MyConn = "C:\db1.mdb"
Set cnDT = New ADODB.Connection
cnDT.Provider = "Microsoft.Jet.OLEDB.4.0"
cnDT.Open MyConn

The recordset that I am trying to build is an editable set if that makes any difference. Because I used basically the same statements to retrieve information from DB1 in a read only method.

Thanks in advance!
 
So it looks like I may have found the solution to my problem. I have DB1 split into a front and back end. For some reason I cannot open the connection to the front end when it is already open (Unless one of you lovely people have a way I can). I can open a connection to the back end even though other front ends already have open connections to it.

This is going to be a real headache because all of my querys are written into the front end and now I am going to have to redo most of those to get them usable in the back end. This is crazy. I am open to suggestions.
 

Users who are viewing this thread

Back
Top Bottom