Subject Re: [firebird-support] Locking records in stored procs
Author Antonio Carrillo
On Thu, 11 Nov 2004 21:26:00 +1100, Helen Borrie <helebor@...> wrote:
>
> At 08:48 AM 11/11/2004 +0100, you wrote:
>
> >Thanks. I've tried the FOR UPADTE WITH LOCK and it's perfect. But ┬┐can
> >I do that inside a stored procedure? The FOR UPDATE WITH LOCK gives me
> >an error.
> You'll have to be a bit more explicit about what you are doing in the SP.
>
> ./hb

Hello.

As I've said before, the Delphi application works with DB2 on an
AS400. The idea is to try to emulate as much as I can the DB2 portion
with Firebird, so future releases of the application only need
recompiling against different libraries to work with DB2 or Firebird.
The original application has a stored procedure that reads a record
and locks it. Then this record is procesed by the application and the
results of the process are saved again in the record using another
stored procedure, unlocking the record. It's important that no other
user reads the record and begins processing it until the first user
ends his work.
I want to emulate this behaviour without writing Delphi code, simply
writing an equivalent stored procedure, to get the same code working
with DB2 and Firebird.


--
--
Antonio Carrillo
antonio.a.carrillo@...