ODAC 5.55.0.19
delphi7
oracle9i
TOraSession.Options.CharLength := 0;
TOraSession.Options.Charset := '';
TOraSession.Options.UseUnicode := True;
I can insert a string containing Chinese characters into a clob correctly,but when I query such a clob field from db, return errors:
error Message:
'ORA-06505: PL/SQL: variable requires more than 32767 bytes of contiguous memory'
why?
and,when I set TOraSession.Options.UseUnicode := False; It is OK,but the string has been truncted.
below is my sample codes:
write clob(work well):
ls_sql:='insert into TB_SD (bh,value) values(:bh,EMPTY_CLOB()) RETURNING value INTO :value';
DM.ORAQuery1.Close;
DM.ORAQuery1.SQL.Clear;
DM.ORAQuery1.SQL.Add(ls_sql);
DM.ORAQuery1.ParamByName('bh').Value:=1;
DM.ORAQuery1.ParamByName('value').ParamType:=ptInput;
DM.ORAQuery1.ParamByName('value').DataType := ftOraClob;
DM.ORAQuery1.ParamByName('value').AsOraClob.IsUnicode:=true;
DM.ORAQuery1.ParamByName('value').AsOraClob.AsWideString := Widestring('国际语言12ab');
DM.ORAQuery1.Prepared:=true;
DM.ORAQuery1.ExecSQL;
Here works well.
read from clob(not correct):
ls_sql:='select SDDSC from TB_SD where RPJINCD='+edit1.Text;
dm.OraSession1.Options.UseUnicode:=true;
DM.ORAQuery1.Close;
DM.ORAQuery1.SQL.Clear;
DM.ORAQuery1.SQL.Add(ls_sql);
DM.ORAQuery1.Prepare;
DM.ORAQuery1.ExecSQL
Only part of characters can be read out.
Can you tell me why? and how can I solve this problem? thanks.
CLOB with asia characters read error
-
- Devart Team
- Posts: 925
- Joined: Thu 17 Nov 2005 10:53