Subject | Re: [ib-support] SQL-SELECT/DELETE unique value from table in multiuser app |
---|---|
Author | Vince Duggan |
Post date | 2002-05-27T09:13:02Z |
A few points to this reply:
components?
Select the new value.
Delete the row, and make sure that rowcount is one.
If you successfully deleted and committed, then use the value. If you get an
error then start a new transaction and select a new value.
Vince
> Hello everyone. I am writing an application using Firebird and DelphiAnt particular reason you're using ODBC. Why not IBX or IBO native
> 6 using the EasySoft ODBC driver.
components?
> How do I guarantee that an ACCOUNT_NUMBER does not get used more thanYou don't need to lock the table.
> once if two or more users are inserting at the same time? I think I
> want to lock the DOWNTIME_ACCOUNTS table, get the first record, delete
> the record, then unlock the table. Am I thinking correctly? :) If so,
> how is this implemented via Delphi & ODBC?
Select the new value.
Delete the row, and make sure that rowcount is one.
If you successfully deleted and committed, then use the value. If you get an
error then start a new transaction and select a new value.
Vince