Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
the data in access db is this:

download demo code:http://files.cnblogs.com/songtzu/ADO.rar[^]

C++
m_Conn.SetConnectionString("Provider=Microsoft.Jet.OLEDB.4.0; Data Source= TestDb.mdb;Jet OLEDB:DataBase password=1314;");
m_Conn.Open("","","",ConnectOption::adConnectUnspecified);
m_Cmd.SetActiveConnection(m_Conn);


my db connect code is this:


Email

yangxb@126.com
chenki@163.com
Liugob@126.com333
Tangyl@yahoo.com
Zhangzd@hotmail.com
dfgd@eter.com
中文邮箱@gmail.com
中文邮箱@gmail.com
try@gmail.com

I trid to use "select like " to get "try@gmail.com"
here is my vc++ code:
m_Cmd.SetCommandText("select * from Phone where Email LIKE '%try%' ");
it would prompt "not data found"


if I try to select the first unicode text "中文邮箱@gmail.com" by this:
m_Cmd.SetCommandText("select * from Phone where Email LIKE '%中文%' ");

It has right result.Is this access's bug?
Posted
Updated 20-Feb-14 14:40pm
v4

1 solution

Have a look here: How to Query a Unicode SQL table column from Access 2010[^]. It might help.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900