PConnect('','scott','natsoft'); $db->debug = 99; /* */ define('MYNUM',5); $stmt = $db->Prepare("BEGIN adodb.open_tab(:RS,'A%'); END;"); $db->InParameter($stmt, $cur, 'RS', -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
"; } print "
Error with myproc
"; $stmt = $db->PrepareSP("BEGIN adodb.data_out(:a1, :a2); END;",true); $a1 = 'Malaysia'; //$a2 = ''; # a2 doesn't even need to be defined! $db->InParameter($stmt,$a1,'a1'); $db->OutParameter($stmt,$a2,'a2'); $rs = $db->Execute($stmt); if ($rs) { if ($a2 !== 'Cinta Hati Malaysia') print "Stored Procedure Error: a2 = $a2"; else echo "OK: a2=$a2
"; } else { print "Error in using Stored Procedure IN/Out Variables
"; } $tname = 'A%'; $stmt = $db->PrepareSP('select * from tab where tname like :tablename'); $db->Parameter($stmt,$tname,'tablename'); $rs = $db->Execute($stmt); rs2html($rs); ?>