|
Hello again. This particular problem is driving me nuts. I have an embedded dynamic SQL statement that refuses to function. The code is copied from another program that DOES work. It's an RPGIV program called from another RPGIV program in an interactive environment at V4R1. It was compiled with DLYPRP(*YES) and COMMIT(*NONE) and code is as follows: C/Exec SQL Prepare StateM1 into :QSQS00 from :WKSQLSTMT C/End-Exec C* C/Exec SQL Declare BusinessUnit Cursor For StateM1 C/End-Exec C* C/Exec SQL Open BusinessUnit C/End-Exec C* C/Exec SQL + Fetch from BusinessUnit into + :@BUSUNIT, :@BUNAME C/End-Exec I've checked the WKSQLSTMT and it it correct. It even executes when run in an SQL session. The error code is -000000804, which translates to SQLDA not valid, error type 6. The explanation for this message is rather unhelpful to me, but it does return this error code after the "PREPARE" and "DECLARE" statements. Did I mention this works in another program? Any help, as always, will be greatly appreciated. Donald R. Fisher, III Project Manager Heilig-Meyers Furniture Company (804) 784-7500 ext. 2124 Don.Fisher@HeiligMeyers.com +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.