Subject | Re: Transaction concurrency |
---|---|
Author | nagypapi |
Post date | 2005-01-12T10:29:29Z |
A reply in the support list suggested a not so elegant solution using
a helping table with one row, and after reading some FB1.5
sql.extension documentation:
Before I do anything I should select * from helpertable WITH LOCK
and if this works, it means only I have lock access to that row until
the current transaction ends.
And this I can do in a SP
And this won't cause conflicts with any transactions, that only want
to read from my reservation table and not update it through the SP
And if I want to add some granularity I can dynamicly fill this helper
table with dates, so that the SP will only lock the row(s) that has
the date(s) of the reservation it wants to insert
John
a helping table with one row, and after reading some FB1.5
sql.extension documentation:
Before I do anything I should select * from helpertable WITH LOCK
and if this works, it means only I have lock access to that row until
the current transaction ends.
And this I can do in a SP
And this won't cause conflicts with any transactions, that only want
to read from my reservation table and not update it through the SP
And if I want to add some granularity I can dynamicly fill this helper
table with dates, so that the SP will only lock the row(s) that has
the date(s) of the reservation it wants to insert
John