PConnect('','scott','tiger'); $db->debug = true; #--------------------------------------------------------------- # EXAMPLE 1 # explicitly use Parameter function #--------------------------------------------------------------- $stmt = $db->Prepare("BEGIN adodb.open_tab(:RS,'%'); END;"); $db->Parameter($stmt, $cur, 'RS', false, -1, OCI_B_CURSOR); $rs = $db->Execute($stmt); if ($rs && !$rs->EOF) { print "Test 1 RowCount: ".$rs->RecordCount()."
"; } else { print "Error in using Cursor Variables 1
"; } #--------------------------------------------------------------- # EXAMPLE 2 # Equivalent of above example 1 using ExecuteCursor($sql,$rsname) #--------------------------------------------------------------- $rs = $db->ExecuteCursor( "BEGIN adodb.open_tab(:RS,'%'); END;", # pl/sql script 'RS'); # cursor name if ($rs && !$rs->EOF) { print "Test 2 RowCount: ".$rs->RecordCount()."
"; rs2html($rs); } else { print "Error in using Cursor Variables 2
"; } ?>