|
Ok....but I'm not actually doing COMMIT's or ROLLBACK's. -----Original Message----- From: Haas, Matt [mailto:Matt.Haas@xxxxxxxxxxx] Sent: Tuesday, November 18, 2003 4:38 PM To: RPG programming on the AS400 / iSeries Subject: RE: SQL Cursor closing at wrong time Dawn, When you do COMMIT's or ROLLBACK's, you need to specify the HOLD option on them or the cursor's will be closed. This is explained in the SQL programming books. Matt -----Original Message----- From: Siegrist, Dawn (EM, PTL) [mailto:Dawn.Siegrist@xxxxxxxxxx] Sent: Tuesday, November 18, 2003 4:23 PM To: RPG400 List (E-mail) Subject: SQL Cursor closing at wrong time I am having a problem with an embedded SQL program which calls a procedure that also has embedded SQL. In the calling program, I prepare the statement, declare the cursor, open the cursor and do a fetch statement. It then does some processing on the fetched record and calls a procedure that also does SQL using a cursor (with a different cursor name). The procedure closes the cursor prior to the return statement. In the calling statement, I then do a fetch to get the next statement and find that the cursor is closed. Why is the cursor from the calling program closed? I tried putting a WITH HOLD on the DECLARE CURSOR, but that didn't help. Anyone have any ideas? Dawn Siegrist Sr. Programmer/Analyst Penske Truck Leasing Co. 610-775-6243 Dawn.Siegrist@xxxxxxxxxx _______________________________________________ This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/rpg400-l or email: RPG400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.