× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Note that the phpbuilder.com link I listed below seems to be identical to the following IBM link.

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.php.doc/doc/r0022495.htm

Glenn

On 12/2/2010 8:41 AM, Glenn Hopwood wrote:
I'm not sure if it's your problem, but I don't think you should have the
'$' in front of your variable names in the db2_bind_param() functions.

Suspect lines...
db2_bind_param($stmt, 1, "$vendor", DB2_PARAM_IN);
db2_bind_param($stmt, 2, "$model", DB2_PARAM_IN);

Should be...
db2_bind_param($stmt, 1, "vendor", DB2_PARAM_IN);
db2_bind_param($stmt, 2, "model", DB2_PARAM_IN);

http://www.phpbuilder.com/manual/function.db2-bind-param.php

Glenn

On 12/1/2010 1:47 PM, Michael Ryan wrote:
I've cross posted this since it's an RPG/stored procedure question.

Thanks!

---------- Forwarded message ----------
From: Michael Ryan<michaelrtr@xxxxxxxxx>
Date: Wed, Dec 1, 2010 at 1:46 PM
Subject: Execute Failed with Stored Procedure Call
To: Web Enabling the AS400 / iSeries<web400@xxxxxxxxxxxx>


Hi folks -

Could someone help me out with this? I'm trying to call a stored
procedure
from my PHP script. Lots of help from lots of folks, and it's very much
appreciated. I've decided to use the MODS approach. I'm getting an
error on
the db2_execute...here's a link to the PHP code:
http://code.midrange.com/09a32d9a0e.html

I know the connection is being made, and I know the db2_prepare is
successful. I'm passing two parameters to the procedure and expecting an
array (MODS) back. Do I need to specify the array in the db2_prepare
statement?

Here's my CREATE PROCEDURE statement that I executed from STRSQL:

CREATE PROCEDURE INVENTORY/SPR101R(IN pInVnda CHAR ( 5), IN pInMdl
CHAR ( 20)) LANGUAGE RPGLE NOT DETERMINISTIC READS SQL DATA CALLED
ON NULL INPUT EXTERNAL NAME 'NEWSYS/SPR101R' PARAMETER STYLE GENERAL

Here's the salient part of my RPG code:

Exec SQL
Set Result Sets For Return To Client
Array :ReturnDS For :WkRowcount Rows;

This works when I call the procedure from iSeries Navigator.

Thanks!



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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

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.