×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




What is the error number you get when it errors out? It is located in the
field SQLCOD.

-----Original Message-----
From: MWalter@hanoverwire.com [mailto:MWalter@hanoverwire.com]
Sent: Tuesday, October 16, 2001 3:51 PM
To: rpg400-l@midrange.com
Subject: SQL


Hello all,

Does anyone see anything wrong with this statement?

     c/exec sql
     c+ DECLARE c1 CURSOR FOR
     c+ SELECT a.ordno, a.ordlv, a.ordtyp, a.rdate, a.adate, a.ordtot
     c+ FROM Oeordh a JOIN Orhlact b
     c+ ON a.ordno = b.ordno AND a.ordlv = b.ordlv
     C+ WHERE b.rmvdate = 0 AND a.cusno = cusno
     c/end-exec

     c/exec sql
     c+ open c1
     c/end-exec

The pre-compiler tells me that the cursor is not declared.
I've tried it as a prepared statement as well.

OS/400 V4R5  ILE RPG


Thanks,

Mark


Mark Walter
Sr. Programmer/Analyst
Hanover Wire Cloth a div of CCX, Inc.
mwalter@hanoverwire.com
http://www.hanoverwire.com
717.637.3795 Ext.3040

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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 thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.