Locked recordsets on a multi-user database

  • Thread starter Thread starter Hukleberie
  • Start date Start date
H

Hukleberie

Guest
I have built a database for our computer lab that uses ADO recordsets. The code works fine when only one user is on the system, but when another user tries to open the code it gives the error that a user has the data exclusively locked or I need permission to view the data. I copied the database down to the hard drive on each computer, so I thought it must be the recordsets. Here is the code I use to open the recordsets:

With cnnCBT
.Provider = "Microsoft.Jet.OLEDB.4.0"
.Open "C:\SHTC\CBT_UPDATE_A.mdb", "Admin"
End With

With rstList
Set .ActiveConnection = cnnCBT
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockOptimistic
.Open strSQLsub
End With

Thanks for any help!

Bradley McDonald
 

Users who are viewing this thread

Back
Top Bottom