S
Sajit Nayar
Hi folks,
I am currently developing a system in access 2003. I am using only one mdb
file as my front end and back end. I have created forms and tables in one mdb
file. When I try to open the connection i getting the error like this :
Run time error '-2147467259 (80004005)'
the database has been placed in a state by user '<user name>' on machine
'<machine name>' that prevents it from being opened or locked.
I am also pasting my code snippet:
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
If conn.State = 1 Then
conn.Close
Else
On Error GoTo MyErr
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
CurrentProject.Path & "\login.mdb;Persist Security Info=False"
rs.Open "select * from login", conn, adOpenDynamic, adLockOptimistic
txtUnm.Value = rs.Fields(0)
txtPwd.Value = rs.Fields(1)
End If
MyErr:
MsgBox Err.Number & " " & Err.Description
I am getting above error on the conn.open statement.
Any help is appreciated.
Thank u.
I am currently developing a system in access 2003. I am using only one mdb
file as my front end and back end. I have created forms and tables in one mdb
file. When I try to open the connection i getting the error like this :
Run time error '-2147467259 (80004005)'
the database has been placed in a state by user '<user name>' on machine
'<machine name>' that prevents it from being opened or locked.
I am also pasting my code snippet:
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
If conn.State = 1 Then
conn.Close
Else
On Error GoTo MyErr
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
CurrentProject.Path & "\login.mdb;Persist Security Info=False"
rs.Open "select * from login", conn, adOpenDynamic, adLockOptimistic
txtUnm.Value = rs.Fields(0)
txtPwd.Value = rs.Fields(1)
End If
MyErr:
MsgBox Err.Number & " " & Err.Description
I am getting above error on the conn.open statement.
Any help is appreciated.
Thank u.