Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: How to insert a long string into a field CLOB
How to insert a long string into a field CLOB
Posted: 2008/03/19 10:08
 
Hi,

How to insert a string size to values less than 8000 in Oracle 10G, field description type CLOB

I tried

SQL.Clear;
SQL.Add('Insert into TestTable (id, description) values (1, EMPTY_CLOB()) RETURNING description INTO :V1');
ParamByName('V1').AsBlob := vs_description; // String size 8737
or
ParamByName('V1').AsString := vs_description; // String size 8737

but, i receive a message "can bind a LONG value only for insert into a LONG column".

With my best regards

Christian Balz

Post edited by: christian, at: 2008/03/19 10:11
Re:How to insert a long string into a field CLOB
Posted: 2008/03/19 11:37
 
Hello

Use this code:

 SQL.Clear; SQL.Add('Insert into TestTable (id, description) values (1, EMPTY_CLOB()) RETURNING description INTO :V1'); with ParamByName('V1') do begin   DataType := ftOraClob;   AsBlob := vs_description; end;

Re:How to insert a long string into a field CLOB
Posted: 2008/03/19 12:33
 
Thank you Diman.

regards,

Christian