Question : Problem with "like" keyword, when database is in chinese

I am using Microsoft odbc drivers to connect to my Access database.

Using "like" in my sql statement from my MFC application e.g.

"select * from table where data like '%sum%'"
OR
"select * from table where data like '*sum*'"

gives the following error :

Error String:Out of memory
retcode:-1
State:22005,Native:-3030,Origin:[Microsoft][ODBC Microsoft Access Driver]

My User default LCID is = 2052
My MsAccess database is having data in 932 codepage.



Whereas the following sql statement executes fine
"select * from table where data = 'sumdata'"

If my MsAccess database is having data in 20127(US-AsCII) codepage
"select * from table where data like '%sum%'" or "select * from table where
data like '*sum*'" SQL Statement executes fine

Answer : Problem with "like" keyword, when database is in chinese

Funnily enough - I've never used Chinese in any application, so can't help you per se.
However - if an issue has anything to do with languages and internationalization in Access/VB then there's one place to look first
Michael Kaplan's
http://www.trigeminal.com

Just a suggested place to begin an investigation really.
Random Solutions  
 
programming4us programming4us