Charset problem

Charset problem

Postby aguillien » Thu 30 Sep 2010 07:11

Hello,

I am migrating applications from BDE to dbxoda450 with delphi7, the database is Oracle 11g.

Everything works fine apart one problem :

I have a SQLConnection with a AfterConnect event :
procedure TForm1.DB_TESTAfterConnect(Sender: TObject);
const
coCharset = TSQLConnectionOption(204);
begin
// database nls_characterset is set to WE8MSWIN1252
DB_TEST.SQLConnection.SetOption(coCharset, Integer(PChar('WE8MSWIN1252')));
end;

I have a test table :
create table TEST_DBX (TEST_VALUE varchar2(20))

I have two different methods to insert values :
var Q: TSimpleDataSet;
begin
// Insert method 1
Q.DataSet.CommandText:= 'insert into TEST_DBX (TEST_VALUE) values (:TEST_VALUE)';
Q.DataSet.ParamByName('TEST_VALUE').AsString:= 'aâeéeèeêuù'; // <=== Note the âéèêù
Q.DataSet.ExecSQL;
// Insert method 2
Q.DataSet.CommandText:= 'insert into TEST_DBX (TEST_VALUE) values (''aâeéeèeêuù'')'; // <=== Note the âéèêù
Q.DataSet.ExecSQL;
end;

When I read DBX_TEST, here's what I have :
Insert method 1 : aâeéeèeêuù
Insert method 2 : a¿e¿e¿e¿u¿

Is there a method to ensure Insert method 2 works ?

Thanks,

AG
aguillien
 
Posts: 2
Joined: Wed 29 Sep 2010 07:49

Postby aguillien » Fri 01 Oct 2010 09:51

I have more informations :

We have W2003 32 bits servers with Oracle 9i client installed. On them, what I posted above work well.

We have our new W2008 R2 64 bit servers with oracle 11g client installed. On them, it reacts as posted above.

I checked registry client configuration on both, and NLS_PARAMETERS are the same (FRENCH_FRANCE.WE8MSWIN1252).

Thus, I believe the problem comes either from the oracle 11g client or the way dbxoda450 work with but I have no more clue.

Thanks for your help,

A. Guillien
aguillien
 
Posts: 2
Joined: Wed 29 Sep 2010 07:49

Postby andersondessis » Mon 21 Feb 2011 21:02

Hello ..

Do You got a solution? I'm having the same problem (BDS 2006)

= \
andersondessis
 
Posts: 3
Joined: Mon 21 Feb 2011 20:40

Postby AlexP » Tue 22 Feb 2011 12:18

Hello,

andersondessis,

Please send me results of the following queries:

SELECT USERENV ('language') from dual;

SELECT * FROM V$NLS_PARAMETERS;
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Postby andersondessis » Tue 22 Feb 2011 12:47

Hello AlexP...

Follows...

SELECT USERENV ('language') from dual:
BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252

SELECT * FROM V$NLS_PARAMETERS:
PARAMETER VALUE
NLS_LANGUAGE BRAZILIAN PORTUGUESE
NLS_TERRITORY BRAZIL
NLS_CURRENCY R$
NLS_ISO_CURRENCY BRAZIL
NLS_NUMERIC_CHARACTERS ,.
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD/MM/RR
NLS_DATE_LANGUAGE BRAZILIAN PORTUGUESE
NLS_CHARACTERSET WE8MSWIN1252
NLS_SORT WEST_EUROPEAN
NLS_TIME_FORMAT HH24:MI:SSXFF
NLS_TIMESTAMP_FORMAT DD/MM/RR HH24:MI:SSXFF
NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZR
NLS_TIMESTAMP_TZ_FORMAT DD/MM/RR HH24:MI:SSXFF TZR
NLS_DUAL_CURRENCY Cr$
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
NLS_LENGTH_SEMANTICS BYTE
NLS_NCHAR_CONV_EXCP FALSE
andersondessis
 
Posts: 3
Joined: Mon 21 Feb 2011 20:40

Postby andersondessis » Fri 25 Feb 2011 13:45

Do you have any plans to fix the problem? Or guide for follow ...

I need a solution to continue with the tests.

Thanks.
andersondessis
 
Posts: 3
Joined: Mon 21 Feb 2011 20:40

Postby AlexP » Fri 25 Feb 2011 14:11

Hello,

Still I cannot reproduce the problem.
I will notify you as soon as I have any results.
AlexP
Devart Team
 
Posts: 5530
Joined: Tue 10 Aug 2010 11:35


Return to dbExpress driver for Oracle