OCI8 Stored procedure execution

From: Date: Mon, 12 Jun 2000 12:28:52 +0000
Subject: OCI8 Stored procedure execution
Groups: php.db 
Request: Send a blank email to php-db+get-337@lists.php.net to get a copy of this message
Hello all, I am a new OCI8 user and am trying to execute an Oracle 8i stored procedure and get a return value back. The PHP4 code is: <?php print "<HTML><PRE>"; print "test 8: execute stored procedure<br>"; $conn = OCILogon("fredb","fmb22956"); $stmt = OCIParse( $conn, "execute mytest( :albumItemId );" ); OCIBindByName( $stmt, ':albumItemId', &$albumItemId, 10 ); OCIExecute( $stmt ); print "albumItemId=$albumItemId<br>"; OCIFreeStatement($stmt); OCILogOff($conn); print "</PRE></HTML>"; ?> Produces the following error: test 8: execute stored procedure Warning: OCIStmtExecute: ORA-00900: invalid SQL statement in /home/fredb/xanboo/htdocs/testoci8.htm on line 14 albumItemId= The stored procedure definition is: /* mytest.sp: test stoed procedure */ create or replace procedure mytest( albumItemId out number ) is begin select albumitemseq.nextval into albumItemId from dual; end; / Executes without a problem from SQL/Plus. Can anyone help me locate the problem? Thanks.

« previous php.db (#337) next »