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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ado recordset locking problem

Status
Not open for further replies.

jusan

Programmer
Mar 1, 2002
26
US
I am using VB6 to access(ADO) the Microsoft Access database. I would like to lock the record when I open it and release the lock after I update it for the purpose of data integrity. How can I accomplish this task? If anyone can give me some help, it is highly appreciated.
 
Look into the recordset lock types. Here is a code snippet

If rsData.State = adStateOpen Then
rsData.Close
End If
With rsData 'Establish Record Set Connection ,Cursor ,Lock And Table
.ActiveConnection = hDB
.CursorLocation = adUseServer
.CursorType = adOpenKeyset
.LockType = adLockOptimistic
.Open "Agenda"
End With

Hope this gets you started. If you choose to battle wits with the witless be prepared to lose.
[machinegun][ducky]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top