How can I tell if a record is locked?
Posted in 1998
Hi, I am accessing an Informix 5.06 database through ADO2.0 and VB5. Informix 3.11 ODBC driver. For testing purposes I have locked a record on the database. I open a recordset (test for recordest.status) and and begin my transaction. When I do an update I get an error -2147467259. If I resume next then the recordest.status is 4096 (is this locked record status?) I am using pessimistic locking in my app and server side cursors. My novice questions are: 1. How can I tell if a record is locked before I try an update? 2. Any ideas how I can trap my initial error? It doesn't look like a healthy error message to me, so I just ignore it ;-) 3. Is it normal/ok practise to begin transactions then have a 'on error resume next' statement (which is how I bypass my original VB error) and test the SQL code returned? rather than the program error? Any information, ideas, would be greatly appreciated as deadlines loom darker. Thanks John