Re: CURSOR STATMENT
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Jonathan Leffler (johnl@informix.com) wrote: > >From: conizzol@pippo.sm.dsi.unimi.it (Conix) > >Subject: CURSOR STATMENT > >Date: 13 Jun 1994 10:59:03 +0200 > >X-Informix-List-Id: <news.7171> > > > >I have some problem with the use of CURSOR STATMENT in ESQL/C programming. > >When I declare a cursor, in a correct mode, and I start a FOR STATMENT to > >fetch every rows wich I want to see with my cursor, if in this FOR i call > >a procedure, for every statment wich this procedure contains, the cursor > >lost the remainig rows, wich I want to see. > Without knowing a good deal about what your procedure does, it is not > possible to be definitive about what your problem is. However, I suspect > that you have a database with transactions, and that your called procedure > does a COMMIT WORK, and your cursor is not declared FOR HOLD. When a > transaction is committed, all currently open (non-HOLD) cursors are closed > automatically. > I can guarantee that your problem is not simply that you are calling a > procedure; it is something you are doing in that procedure, or in the FOR > loop which calls the procedure. > Yours, > Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> In effect Jonathan has centered the problem: In the procedure wich I call I do a transaction. Now if this transaction is not indinspensible I can delete the instructions $BEGIN WORK .... $COMITT WORK to solve the problem? equal the cursor olds all rows? Meanwhile I solve the problem in this mode: I put the rows in a dynamic sequential list, and I call the procedure on the elements of this list. But I know that isn't the right way, for memory usage problem. thanks for response. Conix.