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" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to