|
Perhaps you should try the CLOSQLCUR(*ENDMOD) on your create module command... The manual is very vague on this. Also this may not get the job done for you since you are using this as a generic copy routine... You could also place your service program in a different activation group (Blech). Pretty clueless here. ______________________________________________ Eric N. Wilson President Doulos Software & Computer Services 2913 N Alder St Tacoma WA 98407 ----- Original Message ----- From: Nelson C. Smith <ncsmith@gate.net> To: <RPG400-L@midrange.com> Sent: Sunday, August 08, 1999 11:38 AM Subject: Re: SQL Question > What is the proper SQL way to close a file (or an ODP) that has been opened > with a Prepare, Declare Cursor, Open Cursor, Fetch, Close Cursor series of > statements? As I understand it, the close cursor statement doesn't close > the file, thereby eliminating a lot of overhead on subsequent open cursors. > This is good, but sometimes you might really need to close the file > altogether. I don't see any kind of SQL statement to do that. > > This is generic copy code used in procedures in service programs and even > though the cursor is closed and the procedure goes away, the service program > persists and I am having problems getting rid of the old ODP when I need to > change the keys in the Select Statement. Blowing away the service program > between calls with a RclActGrp command does fix the problem, but is somewhat > of a sledge-hammer method when I would like to have something a little more > precise. I would like to just close whatever the Declare established and > not have the overhead of reinitializing the service program each time. > > A new Prepare and Declare doesn't seem to do it. I get no data returned on > the subsequent calls even though a message is returned saying "1 rows > returned" and no error codes of any kind. Apparently, it is trying to still > use the ODP established by the first Prepare and Declare. Any suggestions? > > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +---END > +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---END
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.