|
On 7/16/2010 4:51 PM, Michael Naughton wrote:
I'm working with a colleague on this. He has some applications that do SQL calls to our iSeries (basically, SELECT statements), and we'd like to turn them into stored procedures, but we're having trouble getting it to work. Everything we've tried sofar
results in either a message on the WonderWare side saying that the procedure can't be found, or the program running on the iSeries but not returning anything because the parameters have something wrong with them (they look okay, but they are being used
as keys and the chains don't find anything; if we hard-code the same values in the program, everything works fine).
From reading the documentation, we think the right things to do are:
use SQLSetStatement to create the statement containing the stored procedure
use SQLPrepareStatement to get a statement handle
use successive SQLSetParamChar's to add the parameters (they're all character parms right now: we're taking baby steps)
use SQLExecute to run the stored procedure
but when we try that we get the error that the stored procedure can't be found. If we change things so the SQLSetStatement includes the parameters in parentheses (and we eliminate the SQLSetParamChar's), then the procedure runs, but it doesn't find
anything.
Is there anyone who has done something like this who might have an example of what the code looks like? We would greatly appreciate it ....
PS: I don't think the stored procedure is a problem -- I've tested it in iSeries Navigator, and it seems to work fine ...
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.