oracle9i NChar problem

oracle9i NChar problem

Postby lk » Fri 15 May 2009 01:38

CREATE TABLE customers
(id NUMBER, name NVARCHAR2(50));

i use SqlQuery --provider--clientdataset
sqlconnection params: useUnicode=true
database have one record data
1001 '犇'
data can be correct display,
but i want to add data by client have problem?
example: input data in clientdataset,
id=1001, name='犇'

clientdataset.applyupdate(0);
ClientDateset.active := False;
ClientDateset.active := True;

the data be:
1001 ?

or
sqltxt := 'INSERT INTO customers VALUES (1002, ''犇'')';
SQLConnection1.ExecuteDirect(sqltxt);

the result is same:
1001 ?

dataBase information:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
NLS setting:
1 NLS_LANGUAGE AMERICAN
2 NLS_TERRITORY AMERICA
3 NLS_CURRENCY $
4 NLS_ISO_CURRENCY AMERICA
5 NLS_NUMERIC_CHARACTERS .,
6 NLS_CALENDAR GREGORIAN
7 NLS_DATE_FORMAT DD-MON-RR
8 NLS_DATE_LANGUAGE AMERICAN
9 NLS_CHARACTERSET ZHT16MSWIN950
10 NLS_SORT BINARY
11 NLS_TIME_FORMAT HH.MI.SSXFF AM
12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
15 NLS_DUAL_CURRENCY $
16 NLS_NCHAR_CHARACTERSET AL16UTF16
17 NLS_COMP BINARY
18 NLS_LENGTH_SEMANTICS BYTE
19 NLS_NCHAR_CONV_EXCP FALSE

client NLS_Lang:TRADITIONAL CHINESE_TAIWAN.ZHT16BIG5
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52

Postby Plash » Mon 18 May 2009 08:19

Please specify your Delphi version.

Unicode characters in SQL is supported in Delphi 2009 only.

Unicode data in parameters should work with all Delphi versions. Please try to execute INSERT statement with a parameter using TSQLQuery. Set DataType of the parameter to ftWideString.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby lk » Tue 19 May 2009 01:30

Plash wrote:Please specify your Delphi version.

Unicode characters in SQL is supported in Delphi 2009 only.

Unicode data in parameters should work with all Delphi versions. Please try to execute INSERT statement with a parameter using TSQLQuery. Set DataType of the parameter to ftWideString.

Delphi version is: Delpphi 2009
i use TSQLQuery and Set DataType of the parameter to ftWideString
SQLQuery1.Params[0].AsString := '犇';
SQLQuery1.ExecSQL();

the result is same the '犇' in database is ?
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52

Postby Plash » Thu 21 May 2009 07:47

Please specify whether this problem occurs only with Direct mode connection (DevartOracleDirect driver).

Note that using the AsString property changes DataType of the parameter to ftString. Try to use Value instead:
Code: Select all
SQLQuery1.Params[0].Value := '犇';
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09

Postby lk » Fri 22 May 2009 14:15

Plash wrote:Please specify whether this problem occurs only with Direct mode connection (DevartOracleDirect driver).

Note that using the AsString property changes DataType of the parameter to ftString. Try to use Value instead:
Code: Select all
SQLQuery1.Params[0].Value := '犇';

I have try both mode, the result is the same!
lk
 
Posts: 11
Joined: Thu 07 May 2009 01:52

Postby Plash » Mon 25 May 2009 08:17

We could not reproduce the problem. Please send to dbxoda*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.
Plash
Devart Team
 
Posts: 2844
Joined: Wed 10 May 2006 07:09


Return to dbExpress driver for Oracle