If you are using a commit statement in your update loop it will close
the cursor. commits have an implicit close cursor. Check for this.
Further , to be very sure include the 'with hold' clause in your cursor.
This will keep the cursor open all the time until you explicitly close
it
Raymond Pinto
pintor@valuerx.com
jhannah@mammoth.org wrote:
> >
> > Greetings --
> >
> > I have created a 4GL scroll cursor named c_jdate intended to update
> three
> > columns. As long as I keep my SQL in 4GL, I can use update
> statements with a
> > "where current of c_jdate" clause without a hitch.
> >
> > Unfortunately, I am forced to prepare and execute one of my update
> statements
> > (due to syntax problems). When I do, the "where current of c_jdate"
> clause
> > suddenly becomes problematic:
> >
> > ---
> > Program stopped at "phhours.4gl", line number 67.
> > SQL statement error number -507.
> > Cursor (c_jdate) not found.
> > ---
> >
> > I checked Informix's Error Message Reference for -507 and it didn't
> help (the
> > cursor is open, has not been misspelled, and has not been freed).
> >
> > Is there some way that I can overcome this problem? Is there some
> sort of
> > universal reference to cursors that I can use?
> >
> > "where current of syscursors.c_jdate" ???