Subject | Re: [firebird-support] Locking records in stored procs |
---|---|
Author | Helen Borrie |
Post date | 2004-11-12T11:08:27Z |
At 09:09 AM 12/11/2004 +0100, I wrote:
way. DB2 imitates Oracle to a degree, so you can make DB2 SPs work quite
like Oracle's.
purpose of my question. It is a different story if you have a SP that is
processing multiple records. But what you are telling us here is still far
too vague. Does the first SP do anything else except this locking?
one stored procedure, does some work, and then calls another stored
procedure. You need Delphi code to call stored procedures.
./heLen
> > You'll have to be a bit more explicit about what you are doing in the SP.You replied
> >
> As I've said before, the Delphi application works with DB2 on anOK, this is usually a gamble. No two DBMSs implement SPs the same
>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.
way. DB2 imitates Oracle to a degree, so you can make DB2 SPs work quite
like Oracle's.
>The original application has a stored procedure that reads a recordI assume then that your SP processes one single record. That was one
>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.
purpose of my question. It is a different story if you have a SP that is
processing multiple records. But what you are telling us here is still far
too vague. Does the first SP do anything else except this locking?
> I want to emulate this behaviour without writing Delphi code, simplyI don't understand this. According to your description, the client calls
>writing an equivalent stored procedure, to get the same code working
>with DB2 and Firebird.
one stored procedure, does some work, and then calls another stored
procedure. You need Delphi code to call stored procedures.
./heLen