My App works with an MS SQL DB; the DB is manipulated (Updates, Inserts, Deletes) by a number of applications so I need a away of detecting whether a table is locked, and if it is waiting and retrying.
Any ideas would be welcome.
Printable View
My App works with an MS SQL DB; the DB is manipulated (Updates, Inserts, Deletes) by a number of applications so I need a away of detecting whether a table is locked, and if it is waiting and retrying.
Any ideas would be welcome.
Hi there,
My suggestion to you is lookup the underlying value property of the ADO recordset to find out if someone has changed anything.
Cheers,
Abhijit
I am not looking to see if the table has changed.
If another application has locked the table and I try and lock the table an error is generated because I cannot open the table exclusively. I would like to know the best way to trap this error.
Ok. Do an On Error Resume Next before using the table. Check for the error code. If it contains a number, it indicates that the table is locked. You will have some specific error code for locked tables.
Cheers,
Abhijit
i am currently using an On Error Resume Next statment but i was wondering if ther was a better way of doing it. ie a specific test that can be performed to find the state of a table.
I don't think so. You have to check for the error being raised, and handle it.
Just a question folks, how do you simulate a locked table in MS ACCESS?
Cheers,
Abhijit