Re: SQLExecDirect in CALL <stored_proc>
| From: | zambak | Date: | Tue, 16 Jan 2001 14:08:45 +0000 |
| Subject: | Re: SQLExecDirect in CALL <stored_proc> | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-5900@lists.php.net to get a copy of this message | ||
Andreas here is exact same message....
Warning: SQL error: [IBM][CLI Driver][DB2/6000] SQL10013N The specified
library "/home/db2inst1/sqllib/function/SP_INS_MALL" could not be loaded. ,
SQL state S1000 in SQLExecDirect in /usr/local/apache/htdocs/DB2test.php on
line 50
and PHP function I executed is:
odbc_exec($cid," CALL SP_INS_MALL('TSTMALL2','TST
BANK','John','Doe') ");
I tried also using prepare and execute but still the same....
Then I found a piece of information on DB2 CLI on Stored Procedure Call
Syntax
Between all it says : (quote)
Unlike ODBC, DB2 CLI does not support literals as procedure arguments,
parameter markers must be used.(end quote)
I created a little app that users CLI and it would not work untill i used
SQLBindParameter() function to connect procedure arguments to a CALL
statement....
Basically You do "CALL SP_INS_MALL (?,?,?,?)" and then use
SQLBindParameter() to replace ? with args.....
Is there a way to call sp in PHP using current ODBC functions. Right now I
don't need output parameters...only input????
"Andreas Karajannis" <karajannis@mediaworx.com> wrote in message
news:3A641468.1040709@mediaworx.com...
> zambak wrote:
>
> > Hi
> >
> > This is probably a question for a core PHP developers working on
ODBC....
> >
> >
> >
> > I have compiled my php 4.0.4 against IBM DB2 libs and all is well untill
i
> >
> > do something like
> >
> > odbc_exec($cid,"CALL <stored_procedure>
> > ('arg1','arg2','arg3')";
> >
> >
> >
> > Call fails saying it could not find certain library.....mentioning
> >
> > SQLExecDirect ODBC function....
> The above statement should work. Could you please give the exact error
> message?
>
> >
> >
> > My questions are :
> >
> > 1. Does or Does not PHP 4.0.4 ODBC functions support CALL SQL statements
> > with input/output arguments.
> >
> As of now, PHP supports only input parameters.
>
> > 2. Can someone give me an example on how to accomplish a CALL statement
with
> > in/out args from PHP when calling a stored procedure....
> >
> See above.
>
> > 3. Are ODBC functions in PHP compliant with ODBC v3.5 specs?
> >
> No, they are still ODBC 2.x
>
> -Andreas
>
> --
> Andreas Karajannis
> mediaworx berlin AG
>
> Fon (0 30) 2 75 80 - 266
> Fax (0 30) 2 75 80 - 200
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>