Page 1 of 1
clob bug!
Posted: Sat 13 Jan 2007 03:38
by xalion
my OS: Windows Xp sp2 chinese
Oracle: oracle 10.2
oracle charset:ZHS16GBK
ODAC version:ODAC 5.8.0.38
delphi :delphi 2006
In your clob demo . I didn't change the orasession 's config.
IN NET mode:
when the clob field only have english. it works fine.
but when the clob filed have chinese . it show
" ORA-22921: length of input buffer is smaller than amount requested"
IN OCI mode:
both chinses and english work fine.
how to use chinese clob in NET mode?
Posted: Sat 13 Jan 2007 13:16
by Horace
Please state your server and client charset separately.
Also, a sample chinese input in hexadecimal format would help to debug this problem.
Do you name your tables and table columns in Chinese too ?
ODAC is developed on English computers, English operating system and English database engine, hence Chinese input is as alien to them as Zeti-Reticulian.
If duplicating your problem requires installation of Chinese Windows, I doubt anyone would even want to go through the trouble of the installation process.
I myself, would not even be able to complete the installation of Chinese Windows because it is so alien to me. Chinese characters look like little shrubs to us in the rest of the world, and they make much more sense to us in the form of hexadecimal code than their native form.
BTW: I am from Poland and English is not my first language either.
some hints
Posted: Sun 14 Jan 2007 04:05
by xalion
I think the problem should be :
Oracle get length of the chinese string as a logic length.
like select length('中国') from dual result=2
select length('中国and') from dual result=5
but in delphi length('中国')=4
length('中国and')=7
so when ODAC trans clob field to oracle,
like ParamByName('Value').AsOraClob.Asstring :='中国'.
ODAC tell Oracle the clob field size is 4.
and oracle get the string and find the size is 2.
so it show ORA-22921: length of input buffer is smaller than amount requested.
Posted: Sun 14 Jan 2007 18:36
by Horace
Do you think that "the problem should be" or that "the problem is" ?
Posted: Mon 15 Jan 2007 13:34
by Challenger
Please check that you have specified the ZHS16GBK charset for the Charset option of TOraSession component. Or set UseUnicode options to True and use AsWideString property.
thank you for reply
Posted: Tue 16 Jan 2007 01:00
by xalion
I set ZHS16GBK charset for the Charset option of TOraSession component.
It caused the same error!
when I set useunicode=true , In your clob demos , when I click the
open button , the demo hangs, and don't responed anymore.
by the way. I used the newst ODAC 5.8.0.39 .
Posted: Mon 22 Jan 2007 10:40
by Plash
Try to set the Charset option of the TOraSession component to ZHT16MSWIN950. Value of the Charset option should correspond to your operating system character set.
:)
Posted: Tue 23 Jan 2007 09:27
by xalion
Try to set the Charset option of the TOraSession component to ZHT16MSWIN950. Value of the Charset option should correspond to your operating system character set.
same error!
Posted: Wed 24 Jan 2007 08:46
by Plash
We have reproduced this problem and we are working on it. You will be notified when we fix the problem.
Posted: Sat 08 Mar 2008 13:48
by xalion
I use odac 6.25.2.14 now!
but when i use follow code;
for i:=1 to 100000 do
s:=s+'好';
params[0].AsOraClob.Asstring:=s;
insert into don't show error.
but when I select the data from database,
it return a string which size is about 289000.
there are many spaces in the the string.
the string format like '好好.................好'+' ........ '+'好好...................好'+' ........... '+'好好.................好' .
and each spaces string about 32K.
why ?
Posted: Tue 11 Mar 2008 05:36
by xalion
another hints:
if length(s)<64k everything is ok!
Posted: Mon 17 Mar 2008 09:34
by Plash
Please specify whether you have set Direct or UseUnicode options of TOraSession. Also specify the character set of your database.
Posted: Tue 18 Mar 2008 02:57
by xalion
I use dircet mode.
and useunicode:=False
and my oracle character set is ZHS16GBK
Posted: Tue 18 Mar 2008 13:02
by Plash
We have reproduced this problem, and we are working on it. You will be notified when we fix the problem.