Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Locked recordsets on multi-user database

Status
Not open for further replies.
Feb 2, 2001
1
US
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 database, I get 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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top