5
V4.80 8 Mar 2006 (c) 2000-2006 John Lim (jlim#natsoft.com.my). All rights reserved.
6
Released under both BSD license and Lesser GPL library license.
7
Whenever there is any discrepancy between the two licenses,
8
the BSD license will take precedence.
9
Set tabs to 4 for best viewing.
11
Latest version is available at http://adodb.sourceforge.net
14
include("../adodb.inc.php");
15
include("../tohtml.inc.php");
18
$db = ADONewConnection('oci8po');
20
$db->PConnect('','scott','natsoft');
21
if (!empty($testblob)) {
22
$varHoldingBlob = 'ABC DEF GEF John TEST';
24
// create table atable (id integer, ablob blob);
25
$db->Execute('insert into ATABLE (id,ablob) values('.$num.',empty_blob())');
26
$db->UpdateBlob('ATABLE', 'ablob', $varHoldingBlob, 'id='.$num, 'BLOB');
28
$rs = &$db->Execute('select * from atable');
30
if (!$rs) die("Empty RS");
31
if ($rs->EOF) die("EOF RS");
34
$stmt = $db->Prepare('select * from adoxyz where id=?');
35
for ($i = 1; $i <= 10; $i++) {
40
if (!$rs) die("Empty RS");
41
if ($rs->EOF) die("EOF RS");
46
$db = ADONewConnection('oci8');
47
$db->PConnect('','scott','natsoft');
49
$db->Execute("delete from emp where ename='John'");
50
print $db->Affected_Rows().'<BR>';
51
$stmt = &$db->Prepare('insert into emp (empno, ename) values (:empno, :ename)');
52
$rs = $db->Execute($stmt,array('empno'=>4321,'ename'=>'John'));
53
// prepare not quite ready for prime time
54
//$rs = $db->Execute($stmt,array('empno'=>3775,'ename'=>'John'));
55
if (!$rs) die("Empty RS");
57
$db->setfetchmode(ADODB_FETCH_NUM);
60
$stmt = $db->PrepareSP("BEGIN adodb.open_tab2(:rs,:tt); END;",true);
61
$db->OutParameter($stmt, $cur, 'rs', -1, OCI_B_CURSOR);
62
$db->OutParameter($stmt, $vv, 'tt');
63
$rs = $db->Execute($stmt);
65
adodb_pr($rs->fields);
73
$db = ADONewConnection('odbc_oracle');
74
if (!$db->PConnect('local_oracle','scott','tiger')) die('fail connect');
77
'select * from adoxyz where firstname=? and trim(lastname)=?',
78
array('first'=>'Caroline','last'=>'Miranda'));
79
if (!$rs) die("Empty RS");
80
if ($rs->EOF) die("EOF RS");
b'\\ No newline at end of file'