Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How to insert CLOB column with pro*c??
I create a table and insert records with pro*c program.
create table rm96:
SQL>create table rm96(author varchar2(20),article CLOB);
insert record in pro*c:
...
OCIClobLocator *lclob;
EXEC SQL ALLOCATE :lclob;
char Auth[20];
varchar Arti[20000];
unsigned int amt,offset=1;
strcpy(Auth,"John");
strcpy((char *)Arti,"computer science");
amt=strlen(Arti);
EXEC SQL WHENEVER SQLERROR DO ShowSQLError();
EXEC SQL INSERT INTO rm96(author,article)
VALUES (:Auth,EMPTY_CLOB()) RETURNING article INTO :lclob;
EXEC SQL LOB WRITE ONE :amt FROM :Arti INTO :lclob AT :offset;
...
But when I run the program ,it raises an error: ORA-24801: illegal parameter value in OCI lob function
Hope this helps.
Any help would be appreciated.
Simrion
e-mail:simrion_at_263.net
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Feb 09 1999 - 01:37:58 CST
![]() |
![]() |