Board index » delphi » how to catch concurrent update errors?

how to catch concurrent update errors?

In my application, there is a form which displays all the fields
for a given record. The record is retrieved by a IBSQL, which
IBTransaction has the following parameters : concurrency and
nowait.

When two users try to modify the same record, the first one who
posts his modification will succeed.

When the second one try to post his changes, he gets the following
error message :

"deadlock update conflicts with concurrent update".

At this point, it would be nice to display the recently
modified record.

My question is : how do I know that the error is a concurrent
update problem? (I could look at the text message, but this might
change in future versions or in localized versions of IB).

regards,
Vincent

 

Re:how to catch concurrent update errors?


Quote
Vincent Schmid wrote:
> My question is : how do I know that the error is a concurrent
> update problem? (I could look at the text message, but this might
> change in future versions or in localized versions of IB).

  Hi, Vincent. See:
1. IB Language Reference: Error Codes and Messages.
2. Delphi help: Handling exceptions.
3. Delphi help: EIBError class.
If you don't use Delphi, check documentation on your tool for it.

Best regards.

Other Threads