日期:2014-05-19  浏览次数:20500 次

实在没有什么分数了呀!!!那个进来帮我下 急!!我这样写有错误,吗?
DataSet   ds=ac.returnvalue( "select   *from   xinqin   where   xinqi_id   like ' "+DateTime.Now.ToString( "yyyyMMdd ")+ " '% ",null);


模糊查询   老说我语法错误!!!!!!!!!!!!!!!!!


为什么呀

帮我讲下 "     和 '
到底怎么区分?

------解决方案--------------------
try

DataSet ds=ac.returnvalue( "select * from xinqin where xinqi_id like ' "+DateTime.Now.ToString( "yyyyMMdd ")+ "% ' ",null);

*from 连在一起了
like 后加空格
%放在 ' '内
------解决方案--------------------
"select *from xinqin where xinqi_id like ' "+DateTime.Now.ToString( "yyyyMMdd ")+ " '% "
-->
"select *from xinqin where xinqi_id like ' "+DateTime.Now.ToString( "yyyyMMdd ")+ "% ' "