出现语法错误,求助高手指点一下!谢谢!
(ASP商城源码)在购物车点击去收银台时出现提示:MicrosoftJETDatabaseEngine'80040e07'日期的语法错误在查询表达式'datestart<...
(ASP商城源码)在购物车点击去收银台时出现提示:
Microsoft JET Database Engine '80040e07'
日期的语法错误 在查询表达式 'datestart<#2010-4-20 上午 04:05:02# and dateend>#2010-4-20 上午 04:05:02# and sumstart<55 and (sumend>55 or uplimit=1)' 中。
\cart1.asp, line 239
然后俺在“cart1.asp”中找到这段代码:
sql="select * from huodong where datestart<" & "#" & now()& "# and dateend>#" &now() & "# "&" and sumstart<"&sumhuodong&" and (sumend>"&sumhuodong&" or uplimit=1)"
请高手告知一下到底是哪里出错了?谢谢谢谢! 展开
Microsoft JET Database Engine '80040e07'
日期的语法错误 在查询表达式 'datestart<#2010-4-20 上午 04:05:02# and dateend>#2010-4-20 上午 04:05:02# and sumstart<55 and (sumend>55 or uplimit=1)' 中。
\cart1.asp, line 239
然后俺在“cart1.asp”中找到这段代码:
sql="select * from huodong where datestart<" & "#" & now()& "# and dateend>#" &now() & "# "&" and sumstart<"&sumhuodong&" and (sumend>"&sumhuodong&" or uplimit=1)"
请高手告知一下到底是哪里出错了?谢谢谢谢! 展开
1个回答
展开全部
貌似JET看不懂中文日期,
可以改成:
sql="select * from huodong where datestart<Format(now(), 'yyyy/mm/dd hh:mm:ss') and dateend>Format(now(), 'yyyy/mm/dd hh:mm:ss') "&" and sumstart<"&sumhuodong&" and (sumend>"&sumhuodong&" or uplimit=1)"
可以改成:
sql="select * from huodong where datestart<Format(now(), 'yyyy/mm/dd hh:mm:ss') and dateend>Format(now(), 'yyyy/mm/dd hh:mm:ss') "&" and sumstart<"&sumhuodong&" and (sumend>"&sumhuodong&" or uplimit=1)"
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询