Russian charset causes problems in DIRECT mode...

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
CHERTS
Posts: 5
Joined: Mon 21 Sep 2009 13:46

Russian charset causes problems in DIRECT mode...

Post by CHERTS » Tue 06 Oct 2009 02:44

Russian charset causes problems in DIRECT mode when working with UNICODE

hello,

I develop a program that connect to Oracle10g database and select data from tables in the Russian encoding.

I'm using ODAC 6.90.0.51 and C++ Builder 6.0

Code: Select all

OraSession1->LoginPrompt = false;
OraSession1->Username = userName;
OraSession1->Password = userPassword;
OraSession1->Server = oraServer;
OraSession1->Options->Direct = true;
OraSession1->Options->UseUnicode = true;
OraSession1->Options->Charset="RU8PC866";
OraSession1->Connect();
If set OraSession1->Options->Charset parametrs, the program will not start. In this case no mistakes.

If Charset not set, the program works, but request with the data encoded in Russian are not processed :(

How can I remove this problem.
Would you guide me ?

Thanks ;)

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 06 Oct 2009 07:05

The Charset option should contain the client character set. When UseUnicode=False, you can set it to CL8MSWIN1251 or do not set Charset at all.
When UseUnicode=True, Charset should be empty.

Please specify how russian characters are returned when Charset is empty. Specify the character set of your database.

CHERTS
Posts: 5
Joined: Mon 21 Sep 2009 13:46

Post by CHERTS » Tue 06 Oct 2009 07:27

The problem is not in the return of Russian characters.
The problem in the SQL query with Russian symbols.

Code: Select all

OraSession1->Options->Direct = true;
OraSession1->Options->UseUnicode = true;
OraSession1->Options->Charset="";
do

select id, fullname from users where name = 'RUSSIAN CHARACTERS' ;

return null :(

Database encoding - CL8ISO8859P5

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Wed 07 Oct 2009 07:55

Direct mode has some problems with converting the query text to the database character set. It is recommended to use parameters instead of inserting values directly into the query text.

CHERTS
Posts: 5
Joined: Mon 21 Sep 2009 13:46

Post by CHERTS » Wed 07 Oct 2009 08:06

thank you, but it needs direct mode 8)

will fix the problem in the future?

Post Reply