LIKE Command Problem using OLEDBREADER and MS Access

China☆狼群 提交于 2019-12-11 03:34:15

问题


Odd one this...

The following command returns what I would expect when I run it in query window in Access 2003:

SELECT * FROM Train WHERE [Days] LIKE '*3*'

However when I pass this into my C# code to run (returning an OleDbDataReader) I get nothing.I suspect it's something to do with the LIKE command (when I remove this I get rows).

Any thoughts?


回答1:


Just a guess but try this:

SELECT * FROM Train WHERE [Days] LIKE '%3%'


来源:https://stackoverflow.com/questions/3193350/like-command-problem-using-oledbreader-and-ms-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!