|
Mark, That's how it works. Here's another snippet that'll hopefully make it a little clearer: D workfield s 10 inz('COOL') D apos c const(x'7D') SQLStmt = 'select * from file where field1 = ' + apos + workfield + apos In debug, you'll see that SQLStmt equals: "select * from file where field1 = 'COOL'" This is what's used in the prepare statement, and why you don't need the parameter markers. The downside is that in order for a change in workfield (maybe to 'HOT') to be reflected in the cursor, you have to close the cursor and re-do the prepare, declare & open. Phil --- "mlazarus@ttec.com" <mlazarus@ttec.com> wrote: > Phil, > > So if you have no parameter markers, how do you get > the retrieved data into the program's variables? > > -mark > > Original Message: > ----------------- > My approach has the select statement built entirely > before the prepare without using parameter markers, > so > I don't use 'USING' on the OPEN. That way I can > build > the select anyway I want and the SQL code will be > the > same. > > > > -------------------------------------------------------------------- > mail2web - Check your email from the web at > http://mail2web.com/ . > > _______________________________________________ > 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. > __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.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.