Hi,
I am using C++ builder 5.0 to developing application. The database is
Sybase Server Anywhere .
I encount problem when I am using chinese charaters.
I connect Database through ODBC.
I have tested the following statement in SQL Explore or query component in
C++ builder
select * from personal where SexID='?' //get all male employee
It will return nothing.
But if I test the same statement in DBISQL which is a tools provided by
Sybase
It will return me all male employee correctly.

Actually I realise something
if we test following statement in SQL Explore in C++ builder
1. select length('?')
It will return 1, but actually it should return 2 because '?' is a
chinese charater.
2. select length(SexID) from personal
It will return 2.
That's why "select * from personal where SexID='?'" return me nothing

But if I test select length('?') and select length(SexID) from personal in
DBISQL. They all return me 2.

I think the only difference between SQL Explore and DBISQL is BDE. DBISQL
directly uses sybase ODBC driver and SQL Explore needs go through BDE.

Anyone has solution for that?


Thanks very much

Bao Yadong
baoyd@creasoft.com.sg