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
Charset problem
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
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
-
- Posts: 3
- Joined: Mon 21 Feb 2011 20:40
-
- Posts: 3
- Joined: Mon 21 Feb 2011 20:40
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
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
-
- Posts: 3
- Joined: Mon 21 Feb 2011 20:40