Re: Transactions and cursors
Posted in 1998
Jason Harris — — source: Informix-list mailing list archive (1991-1998)
Yes, use COMMIT/BEGIN after the update. On Thu, 05 Mar 1998 09:43:30 +0000, Alejandro Dobniewski <adobni@itron.com.ar.removethis> wrote: >It seems to me from the ESQL/C documentation that a cursor must within a >transaction. For example: > >DECLARE CURSOR WITH HOLD ... SELECT * FROM TABLE WHERE FLAG IS NULL FOR >UPDATE >BEGIN WORK // Init transaction >OPEN cursor >while not eof > FETCH > Do something > UPDATE SET FLAG=1 WHERE CURRENT.. >end while >COMMIT WORK // End transaction > >Is it posible to have a transaction for each record, so a ROLLBACK only >affects one record?