Page 1 of 1

TOraSession Unicode mode / german umlaut

Posted: Wed 07 Oct 2015 16:50
by redhair
Hi ODAC Support Team,

I have a problem with the TOraSession component and its UseUnicode property.
When i execute the following code the result set of the query is empty.
I use the german umlaut 'ä' (Unicode-Number : U+00E4 ) in the WHERE clause of the query.

Code: Select all

	OraSession1->Options->UseUnicode = true;
	OraSession1->Options->Direct = true;
        OraSession1->PerformConnect();
	SmartQuery1->Params->Clear();
	SmartQuery1->SQL->Text = "SELECT * FROM SOE.CUSTOMERS WHERE cust_last_name = 'änglert' ";  // with german umlaut 
	SmartQuery1->Execute();
If i use TNS for connection with my Oracle 11g ( NLS_CHARACTERSET : AL32UTF8, Column CUST_LAST_NAME : Datatype VARCHAR2(40 Bytes) ) i have no problems and my result set is not empty :

Code: Select all

CUSTOMER_ID  CUST_FIRST_NAME  CUST_LAST_NAME                          
187920             leroy            änglert                                 
1 row(s) selected
If i use the Direct mode and set the UseUnicode property to false, i get the same result with one selected row.

Thank you.

Re: TOraSession Unicode mode / german umlaut

Posted: Thu 08 Oct 2015 04:32
by AlexP
Hello,

To make such query work, you should set the UseUnicode option and UnicodeEnvironment to True.