Delphi XE7 SDAC Table Locking
Posted: Mon 08 Dec 2014 03:41
I am new to SDAC and SQL Server.
The option to lock a table for bulk update is very useful.
When another instance of my application tries to open the table, how can I detect that the table has a lock placed on it by another user before calling Open.
Calling open and displaying the lock timeout error message seems messy. Delphi only hands back an standard Exception so there are no error codes to analyse which means I would have to detect that the string contained the lock timeout message.
Is there a better way?
The option to lock a table for bulk update is very useful.
When another instance of my application tries to open the table, how can I detect that the table has a lock placed on it by another user before calling Open.
Calling open and displaying the lock timeout error message seems messy. Delphi only hands back an standard Exception so there are no error codes to analyse which means I would have to detect that the string contained the lock timeout message.
Is there a better way?