|
"I just want the stored procedure to interpret exactly what I'm passing it." And that's exactly what happens. Conceptually you're passing it a string. Just one string. The callable-statement parameter mechanism conceptually puts quotes around that one string and plugs it into the parameter. That results in a IN-clause that is comparing to just one string. There is no way to pass it two or three or four strings (which is what you would like to do) because you only have one parameter. "There must be a way..." Let me put it this way. Your question (usually in the context of PreparedStatement) has been asked approximately biweekly on Sun's Java forum for the last several years. From time to time the usual "solutions" are proposed but they turn out not to work. Nobody has ever posted a working solution. To me that says that there is no way. But if you find one, there are thousands of people who want to know what it is. Sorry, PC2 -----Original Message----- From: java400-l-bounces@xxxxxxxxxxxx [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of Kelly Jones Sent: April 5, 2006 13:58 To: Java Programming on and around the iSeries / AS400 Subject: RE: Calling stored procedure from Java app Hi Paul, Yes, I am looking for the resulting SQL statement to look like what you describe. However, I'm not sure what you mean by "A CallableStatement isn't a macro function that replaces arbitrary strings". I'm not trying to replace any string, I just want the stored procedure to interpret exactly what I'm passing it. I can get the procedure to work from Ops Nav "run a script", but can not get it work from the Java app. I can't believe something as simple as this isn't doable. I suppose I could loop through all of the items in my itemList and put them in a temp table on the iSeries and do a select from somestuff where item in (select item from temp table), but I would prefer not to have to do that. There must be a way... Kelly
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.