CLOB with asia characters read error

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jittynj

CLOB with asia characters read error

Post by jittynj » Mon 13 Feb 2006 10:12

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.

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 13 Feb 2006 12:44

We couldn't reproduce your problem. Please try to upgrade to the latest version of ODAC. If the problem still exists please send a small sample that demonstrates your problem to ODAC support address including script to create server objects.

Post Reply