CLOB column insert errors.

From: Date: Mon, 06 Nov 2000 12:01:13 +0000
Subject: CLOB column insert errors.
Groups: php.general 
Request: Send a blank email to php-general+get-23870@lists.php.net to get a copy of this message
Hi everyone, I use the following code to insert data to clob columns (you'll notice that it's v. similar to the OCINewDescriptor() example in the manual):- ------------------------------------------------- $sql_text = "insert into clb (name, muchtext) values (name= 'simon', muchtext= empty_clob()) returning muchtext into :muchtext"; $sql = OCIParse($conn_id, $sql_text ); $lob = OCINewDescriptor($conn_id, OCI_D_LOB); OCIBindByName ($sql, ":muchtext", &$lob, -1, OCI_B_CLOB); OCIExecute($sql, OCI_DEFAULT); //(line 29) if ( $lob->save ("some text")) //(line 30) { OCICommit($conn_id); } else { echo "Could not write text to column<BR>\n"; } ---------------------------------------------- I get the following errors:- Warning: OCIStmtExecute: ORA-00917: missing comma in path/file on line 29 Warning: OCILobWrite: OCI_INVALID_HANDLE in path/file on line 30 Could not write text to column I am not sure if I have to declare a bind variable first i.e. VARIABLE muchtext CLOB. When I tried to do this, I got a "bad variable specification error". Can anyone advise what to do? Please reply before I lose all my hair! Many thanks, Simon.

« previous php.general (#23870) next »