Page 1 of 1
when use CLOB field, problem with korean alphabet (2byte Character)
Posted: Wed 29 Dec 2004 02:17
by kwon
Using OraSession.Option.Net = true
Server script :
CREATE TABLE ODAC_CLOB
(
CODE NUMBER,
TITLE VARCHAR2(30 BYTE),
VALUE CLOB
)
Application script :
insert into odac_clob(code, title, value)
values(:p_code, :p_title, :p_value)
parambyname(':p_value') := '권성태' <--- korean character
select value from odac_clob
Result :
1Byte Character is correct (ex: English character)
but
2Byte Character is not (ex: Korean character)
how get correct result by korean character?
Posted: Wed 29 Dec 2004 12:14
by Alex
You should use the next SQL to insert Clob fileds:
Code: Select all
INSERT INTO ODAC_CLOB (Code,Title,Value)
VALUES (:Code, :Title, EMPTY_CLOB())
RETURNING
Value
INTO
:Value
and watch DataType and ParamType properties of CLOB parameter closely :
Code: Select all
OraSQL1.ParamByName('Value').ParamType := ptInput;
OraSQL1.ParamByName('value').DataType := ftOraClob;
also you should use the next code to set param value:
Code: Select all
OraSQL1.ParamByName('value').AsOraClob.AsString := 'Your CLOB data';
Please read carefully "Working with BLOB and CLOB data types" topic in ODAC
help.
As to Korean characterset we suggest you to use unicode support. You can use
TOraSession.UseUnicode property to enable this behaviour.
Note: Unicode character data support with Net option for Oracle 9i
is available since ODAC version 5.10.
If you need more info pls. see ODAC help, "Working with Unicode character
data" topic.
Posted: Mon 03 Jan 2005 06:37
by Guest
Hi, Alex
i excuted your example code.
but error returned.
ORA-21560: argument 2 is null, invalid, or out of range
ORA-06512: at "SYS.DBMS_LOB", line 775
ORA-06512: at line 1
i need your help....
Posted: Tue 04 Jan 2005 07:25
by Alex
Send us please small demo project to demonstrate the problem and include script to create server objects to ODAC support address.
Opps...
Posted: Thu 06 Jan 2005 06:54
by Guest
hi...
"INSERT" is no problem....
But,
"SELECT" is promblem..
Using "ODAC4.5 - Net Option.."
Incorrect Data Return...
OCI Option Using...
No problem..
Posted: Thu 06 Jan 2005 10:34
by Alex
NLS(National Language Support) and Unicode support in ODAC 4.50 with "Net" option is available only for Oracle 8i server, higher Oracle server versions are supported since ODAC version 5.10.