Re: Not in Transaction Error Message -255
Posted in 1995
Quoting Ruchi Patel...
>
> I am working with online 6.0 version on HP 9000 platform. The database
> uses unbuffered transaction logging. The 4gl program gives -255 error
> message when I am trying to open a cursor that is defined for UPDATE.
> Here is a test program.
>
> PREPARE updt_stmt FROM
> SELECT * FROM T WHERE ROWID = ? FOR UPDATE> DECLARE upd_curs CURSOR FOR updt_stmt
> OPEN upd_curs USING ROWID
>
> I need to convert applications written for SE to work with ONLINE using
> COMPILER. The SE uses NO Transaction logging. The ONLINE uses
> UNBUFFERED TRANSACTION LOGGING. What choices do I have?
>
> If I use BEGIN WORK before OPEN statement then it works fine. According
> to Informix I don't need to re-write all my application.
>
DAMN! That really looks like a code fragment from my code generator...
same style, same cursor names, etc. Anyway, you won't have to re-write
all of your applications, but you will have to tweek all of your applications.
The BEGIN WORK before the OPEN (for update) is needed but you'll also need
COMMIT WORK and/or ROLLBACK WORK in strategic places. One thing I told a
guy I was training to do was run db4glgen against a small table twice. The
only difference between the two runs was the addition of the "-l" option
to generate transaction logging code. He then printed both listings and
he also printed the output from a "diff" of the two programs. This gave
him all the places that needed altered code. BTW, you'll need a few
SET ISOLATION LEVEL statements in some strategic places too.
DAS
--
Dave Snyder @ Bell Atlantic - Philadelphia, PA
WORK: ddx85qr@boots.bell-atl.com HOME: dave@das13.snide.com