Re: can OCIBindByName bind an in/out placeholder of plsql

From: Date: Wed, 07 Jun 2000 07:49:29 +0000
Subject: Re: can OCIBindByName bind an in/out placeholder of plsql
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-1176@lists.php.net to get a copy of this message
On Tue, Jun 06, 2000 at 03:28:56PM -0700, Frank Chang wrote: > Hi : > > I have tried to use php4 OCI8 functions to access oracle database by > utilizing PLSQL . > There is no problem for me to call a plsql stored procedure with IN > parameter or OUT parameter, However, I have problem to implement a > PLSQL stored procedure with an IN/OUT parameter. > Can OCIBindByName bind an in/out parameter of plsql ??? > Can anyone help me about this ??? it should work! pleae send me a 10 line script that shows your problem *plus* the 10 line stored proc that i need to load into my oracle to run it (the script). tc > > Thanks > > Frank > > > I have two examples, the first one work, the second one does not. > > > 1. The following code is the one work for IN or OUT parameter > > CIPLogon($DB_LOGIN, $DB_PASSWORD, $DB) > $stmt = OCIParse($conn, "begin pk_session.USER_VALID('$user', > '$passwd', :out_flag); end;"); > OCIBindbyname($stmt, ":out_flag", $result, 7); > OCIExecute($stmt); > OCIFreeStatement($stmt); > OCILogoff($conn); > > > 2. The following code does not work, because :pSkinID is an IN/OUT > parameter in the PLSQL stored procedure > > $conn = OCIPLogon($DB_LOGIN, $DB_PASSWORD, $DB); > $stmt = OCIParse($conn, "begin > PKG_SkinSrch.UPD_SKIN('$sUserID', :pSkinID); end;"); > OCIBindbyname($stmt, ":pSkinID", $HTTP_POST_VARS[skinid], 5); > OCIExecute($stmt); > OCIFreeStatement($stmt); > OCILogoff($conn); > > -- > 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 -- Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!" Digital Collections Phone +49 40 235350 Fax +49 40 23535180 Hammerbrookstr. 93 20097 Hamburg / Germany

« previous php.general (#1176) next »