M
Michael Miller
I have a 'control' table, tblMetricsControl, with one record with some fields
that I need to reference.
I tried ADO and got connected ok, but then I get an error that the 'database
has been placed in a state by admin that prevents it from being opened'.
My database is split and my front end is on my C: drive and my back end is
on the server, and other people -are- using that be from their fe's.
I get the error on the Open of the Connection (code below).
The code is located in the Form Activate and calls a procedure.
Private Function VerifyStarsProject()
On Error GoTo Err_Form_Close
Dim currConn As New ADODB.Connection
Dim rstXMLImport As New ADODB.Recordset
Dim currDB As Database
Set currDB = CurrentDb
Set currConn = New ADODB.Connection
With currConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source= " & currDB.Name
.Open <ERRS here>
End With
Set rstXMLImport = New ADODB.Recordset
With rstXMLImport
.CursorType = adOpenForwardOnly
.LockType = adLockReadOnly
.Open "tblMetricsControl", currConn
.MoveFirst
... <additional code to read the field>
If .Fields("XMLInProgress").Value = True Then
... <etc.>
that I need to reference.
I tried ADO and got connected ok, but then I get an error that the 'database
has been placed in a state by admin that prevents it from being opened'.
My database is split and my front end is on my C: drive and my back end is
on the server, and other people -are- using that be from their fe's.
I get the error on the Open of the Connection (code below).
The code is located in the Form Activate and calls a procedure.
Private Function VerifyStarsProject()
On Error GoTo Err_Form_Close
Dim currConn As New ADODB.Connection
Dim rstXMLImport As New ADODB.Recordset
Dim currDB As Database
Set currDB = CurrentDb
Set currConn = New ADODB.Connection
With currConn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "data source= " & currDB.Name
.Open <ERRS here>
End With
Set rstXMLImport = New ADODB.Recordset
With rstXMLImport
.CursorType = adOpenForwardOnly
.LockType = adLockReadOnly
.Open "tblMetricsControl", currConn
.MoveFirst
... <additional code to read the field>
If .Fields("XMLInProgress").Value = True Then
... <etc.>