Annotation of embedaddon/php/ext/oci8/tests/lob_033.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: various oci_lob_write() error messages
3: --SKIPIF--
4: <?php
5: $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
6: require(dirname(__FILE__).'/skipif.inc');
7: ?>
8: --FILE--
9: <?php
10:
11: require dirname(__FILE__).'/connect.inc';
12: require dirname(__FILE__).'/create_table.inc';
13:
14: $ora_sql = "INSERT INTO
15: ".$schema.$table_name." (id, blob)
16: VALUES (2, empty_blob())
17: RETURNING
18: blob
19: INTO :v_blob ";
20:
21: $statement = oci_parse($c,$ora_sql);
22: $blob = oci_new_descriptor($c,OCI_D_LOB);
23:
24: $blob->save("");
25:
26: oci_bind_by_name($statement,":v_blob", $blob,-1,OCI_B_BLOB);
27: oci_execute($statement, OCI_DEFAULT);
28:
29: var_dump($blob->save(""));
30: var_dump($blob->save("data", 100));
31:
32: require dirname(__FILE__).'/drop_table.inc';
33:
34: echo "Done\n";
35:
36: ?>
37: --EXPECTF--
38: Warning: OCI-Lob::save(): OCI_INVALID_HANDLE in %s on line %d
39: bool(true)
40: bool(true)
41: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>