Consultor Eletrônico



Kbase P87541: How to check if an ADO Recordset Object's record is locked using Visual Basic?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   7/9/2004
Status: Unverified

GOAL:

How to check if an ADO Recordset Object's record is locked using Visual Basic?

FIX:

Use the ADO Recordset Object Update Method and the ADO Error Object Number Property as per the following example:

' Invoke the ADO Recordset Object Update Method. This method will return the ADO ' Error Object Number Property value of 3730 error if the record is locked

rs.update
If Err.Number <> 0 then
MsgBox "Record is read only because it is locked by another user!"
end if