请问asp+sql查询的问题
<%dimstartime,endtimestartime=cdate(request("startime"))endtime=cdate(request("endtim...
<%
dim startime,endtime
startime=cdate(request("startime"))
endtime=cdate(request("endtime"))
if startime="0:00:00" then
startime="1999-1-1"
else
startime=startime
end if
if endtime="0:00:00" then
endtime="2099-1-1"
else
endtime=endtime
end if
dim addlist,sql
set addlist=server.CreateObject("adodb.recordset")
sql= "Select * From goods where ((intype=1 or intype=2) and (time BETWEEN '"&startime&"' and '"&endtime&"'))"
.....
可一直报错,Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。郁闷到了, time字段为日期型,默认值为Date() 展开
dim startime,endtime
startime=cdate(request("startime"))
endtime=cdate(request("endtime"))
if startime="0:00:00" then
startime="1999-1-1"
else
startime=startime
end if
if endtime="0:00:00" then
endtime="2099-1-1"
else
endtime=endtime
end if
dim addlist,sql
set addlist=server.CreateObject("adodb.recordset")
sql= "Select * From goods where ((intype=1 or intype=2) and (time BETWEEN '"&startime&"' and '"&endtime&"'))"
.....
可一直报错,Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。郁闷到了, time字段为日期型,默认值为Date() 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询