Binding host variable to Oracle Object type (Nested Table)

From: Date: Wed, 03 Jul 2002 01:52:31 +0000
Subject: Binding host variable to Oracle Object type (Nested Table)
Groups: php.db 
Request: Send a blank email to php-db+get-20283@lists.php.net to get a copy of this message
Hi! I have an oracle object type as follows, create or replace type my_objtype as object (col1 number, col2 number) / create or replace type my_arrtype as table of my_objtype / I couldn't get this bound in php. If I have an simple oracle object type (see the below one), I could bind it and pass the object to oracle procedure. create or replace type my_arrtype as table of number; How do I bind if my object is a NESTED TABLE OF OBJECTS (my_arrtype).? code snippet: =========== <? $arr = OCINewCollection($conn,'MY_ARRTYPE'); //populate the $arr. Note: I tried various ways here. $arr->append(array(10,100)); $arr->append(array(20,200)); $stmt = OCIParse($conn,"begin my_p(:my_arrBindVar); end;" ) ; arr->append(array(10,100)); $ok = OCIBindByName($stmt,':my_arrBindVar',&$arr,32,OCI_B_SQLT_NTY); //$ok = OCIBindByName($stmt,':my_arrBindVar',$arr,32,OCI_B_SQLT_NTY); OciExecute($stmt,OCI_DEFAULT); ?> I get the following error: "Call to a member function on a non-object in ..." Thanks.

« previous php.db (#20283) next »