Hello:
I am having problems with VB6(SP3) and ADO using an Access 2000 database. I cannot seem to have >1 user in certain forms of my system at once, or I get various errors when users update the database (thru that form)
I'm using the DataEnvironment to open the recordsets.
I'm not sure how ADO is locking the records, if it is at all! I have tried setting the Lock Type to Optimistic and Pessismistic, but same results.
I'm used to the DAO method of catching the error if the record is locked:
** example ***
On Error GoTo ErrorHandler
Datacontrol.Recordset.Edit
' modify code here
Datacontrol.UpdateRecord ' save the data
exit sub
ErrorHandler:
If Err.Number = 3260 Then
MsgBox "This Record Is Locked By Another User - Please Try Again Later", vbExclamation, "Data is Locked"
End If
** end example **********
Question:
What is the proper method for locking records using the DataEnvironment and ADO on an Access 2000 DB ?
All comments appreciated...
Darryl
I am having problems with VB6(SP3) and ADO using an Access 2000 database. I cannot seem to have >1 user in certain forms of my system at once, or I get various errors when users update the database (thru that form)
I'm using the DataEnvironment to open the recordsets.
I'm not sure how ADO is locking the records, if it is at all! I have tried setting the Lock Type to Optimistic and Pessismistic, but same results.
I'm used to the DAO method of catching the error if the record is locked:
** example ***
On Error GoTo ErrorHandler
Datacontrol.Recordset.Edit
' modify code here
Datacontrol.UpdateRecord ' save the data
exit sub
ErrorHandler:
If Err.Number = 3260 Then
MsgBox "This Record Is Locked By Another User - Please Try Again Later", vbExclamation, "Data is Locked"
End If
** end example **********
Question:
What is the proper method for locking records using the DataEnvironment and ADO on an Access 2000 DB ?
All comments appreciated...
Darryl