Re: OCIStmtExecute: ORA-01008: not all variables bound on Anonymous PL/SQL

From: Date: Fri, 09 Aug 2002 17:21:11 +0000
Subject: Re: OCIStmtExecute: ORA-01008: not all variables bound on Anonymous PL/SQL
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-21078@lists.php.net to get a copy of this message
Hi, Does anyone know how to get this done? Thanks, "Prince" <pkumar@intacct.com> wrote in message news:20020807181426.15700.qmail@pb1.pair.com... > I have the sample php program. While trying to execute, I get the above > mentioned error. > > SQL> create type typ_numbertab TABLE OF number(12); > > % cat mytest.php > -----------------------------Program Begins-------------------------------- > #!/usr/local/php4/bin/php -q > <? > $dept = array(10,20,30,40); > > $db = OCILogon("scott","tiger"); > > $arr = OCINewCollection($db,'TYP_NUMBERTAB'); > > $sqlstmt = > " > -- declare > -- :dept TYP_VARCHARTAB ; > begin > forall i in 1..:dept.count > insert into t values (:dept(i)); > end;"; > > $stmt = OCIParse($db,$sqlstmt); > > while (list(,$v) = each($dept)) { > $arr->append($v); > } > > $bnd = OCIBindByName($stmt,':dept',$arr,32,OCI_B_SQLT_NTY); > > OCIExecute($stmt); > ?> > > -----------------------------Program Ends---------------------------------- > > % mytest.php > > <br /> > <b>Warning</b>: OCIStmtExecute: ORA-01008: not all variables bound > in <b>mytest.php</b> on line <b>25</b><br /> > > Can someone tell me what is it complaining about and how to fix this? > > Thanks, > >

« previous php.db (#21078) next »