Page 1 of 1

Russian charset causes problems in DIRECT mode...

Posted: Tue 06 Oct 2009 02:44
by CHERTS
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 ;)

Posted: Tue 06 Oct 2009 07:05
by Plash
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.

Posted: Tue 06 Oct 2009 07:27
by CHERTS
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

Posted: Wed 07 Oct 2009 07:55
by Plash
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.

Posted: Wed 07 Oct 2009 08:06
by CHERTS
thank you, but it needs direct mode 8)

will fix the problem in the future?