hi,
Everyone know this error? The database has been placed in state by user "Admin"!
I am using a access databases
When more than one user has connect to one databases at the same time by using my program (vb.net), the following error message appears.
"The database has been placed in a state by user 'Admin' on machine XXXXX that prevents it from being opened or locked."
How to solve this error? please help!
My following code as below:
Try
DB = New OleDbConnection("Provider=microsoft.jet.oledb.4.0; data source=\\server\prdsystem\prdnsf.mdb;Persist Security Info=False; Mode=Share Deny None")
DB.Open()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Information, "")
End
Finally
DB.Close()
End Try
Da = New OleDb.OleDbDataAdapter(sql, DB)
Ds = New DataSet
Da.Fill(Ds, "emp")
dtp = Me.Ds.Tables(0)
**Although I put the Persist Security Info=False; Mode=Share Deny None, still got the same error!
Please help!
Scott LyslePosted Mar 26, 2007, 11:38 PM
According to Microsoft, rapidly and repeatedly opening and closing a connection to an Access database is the cause. The recommended solution is to maintain the connection during its use rather than to continuously open and reopen it.
http://support.microsoft.com/kb/274211