标签:access sqlserver windowsform
<span style="font-size:18px;">select * from sv_JFVoucher where isDelete=0 and [date]>= '2015-1-20 0:00:00' and [date]<= '2015-1-20 0:00:00' order by id desc</span>
这条sql 语句在SqlServer08中执行是无错误的,可是在access数据库中执行就报错!
百度了一下,说把
<span style="font-size:18px;"><span style="color:#ff6666;">'2015-1-20 0:00:00'</span> 修改成 </span><pre name="code" class="sql"><span style="font-size:18px;color:#ff0000;">#2015-1-20 0:00:00#</span>
<span style="font-size:18px;"> </span>
<span style="font-size:18px;">select * from sv_JFVoucher where isDelete=0 and [date]>= #2015-1-20 0:00:00# and [date]<= #2015-1-20 0:00:00# order by id desc</span>
<span style="font-size:18px;">运行真的成功了,我刚接触access,表示不解</span>
标签:access sqlserver windowsform
原文地址:http://blog.csdn.net/zhj_bg/article/details/43052533