|
Because I saw now way to dynamically execute a statement and return a value with EXECUTE or EXECUTE IMMEDIATE. I have a program right now in development that does exactly what Rick's asking for. Its build the dynamic statement, prepare, declare, open, fetch then close. I certainly would not mind a shorter amount of steps to produce the same result, but I do not know of one that uses a dynamic statement. I just did a test program and I get SQLSTT='42612', SQLCOD=-84. Basically it says a select statement is not allowed in an EXECUTE IMMEDIATE operation. Similar results with PREPARE and EXECUTE. Thanks, Matt -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx Sent: Tuesday, April 11, 2006 2:52 PM To: RPG programming on the AS400 / iSeries Subject: RE: SQLRPG - prepare, declare, no cursor And, why would he want to use a cursor or fetch with this? Rob Berendt
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.