
ASP问题 日期的语法错误 在查询表达式 20
日期的语法错误在查询表达式'authorlike'%李%'andadd_date>=#--#andadd_date<=#--#'中。/td/statistics.asp,...
日期的语法错误 在查询表达式 'author like '%李%' and add_date >= # -- # and add_date <= # -- #' 中。
/td/statistics.asp, 第 213 行
第 213 行语句:
rs.open "select * from message where author like '%李承杰%' and add_date >= # "&D1&" # and add_date <= # "&D2&" #",conn,1,1
这是依靠时间段搜索相关内容的一段语句,其中D1和D2是我设定的两个变量,D1是起始时间,D2是结束时间
D1=Request.Form("StartYear")&"-"&Request.Form("StartMonth")&"-"&Request.Form("StartDay")
D2=Request.Form("EndYear")&"-"&Request.Form("EndMonth")&"-"&Request.Form("EndDay")
在第一次实验中查询功能运行没问题,刷新后就出现错误了,请教为什么 展开
/td/statistics.asp, 第 213 行
第 213 行语句:
rs.open "select * from message where author like '%李承杰%' and add_date >= # "&D1&" # and add_date <= # "&D2&" #",conn,1,1
这是依靠时间段搜索相关内容的一段语句,其中D1和D2是我设定的两个变量,D1是起始时间,D2是结束时间
D1=Request.Form("StartYear")&"-"&Request.Form("StartMonth")&"-"&Request.Form("StartDay")
D2=Request.Form("EndYear")&"-"&Request.Form("EndMonth")&"-"&Request.Form("EndDay")
在第一次实验中查询功能运行没问题,刷新后就出现错误了,请教为什么 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询