先首,祝各位大侠们<中秋节快乐>!
不知道我的这个程序出错,出错在哪里,请大侠们帮小弟解决:
出错信息如下:
Microsoft JET Database Engine '80040e14'
语法错误 (操作符丢失) 在查询表达式 '>=clng('') and <=clng('')' 中。
\wwwroot\cw\searh.asp, line 10
--------------------------------------------------------------------------------
Host by NetBox Version 2.8 Build 4128
原程序如果下:
<!--#Include File="linkdatamdb.asp"-->
<%
select1=request.querystring("select1")
t1=request.querystring("t1")
t2=request.querystring("t2")
set cwrs=server.createobject("ADODB.Recordset")
cwsql="select * from cw_data where "&select1&">=clng('"&t1&"') and "&select1&"<=clng('"&t2&"') Order By id asc"
cwrs.open cwsql,cwconn,1,1
if cwrs.recordcount<1 then
Response.Write "<script language=javascript>alert('对不起,没有找到你要找的内容!');self.location=(""show_data.asp"");</script>"
else
If Request.Querystring("dch_page")="" then
dch_page=1
Else
dch_page=clng(Request.Querystring("dch_page"))
End If
Cwrs.Pagesize=1
Cwrs.AbsolutePage=dch_page
%>
<tr>
<td>
<table border="0" width="100%" id="table4" style="border-collapse: collapse" bgcolor="#0066FF" cellpadding="0">
<tr>
<td>
<table border="1" width="100%" style="border-collapse: collapse" id="table5" height="26" bordercolor="#FFFFFF">
<tr>
<td width="82" align="center">进价</td>
<td width="93" align="center">出售价</td>
<td width="93" align="center">利润</td>
<td align="center">时间</td>
<td width="144" align="center">拿货地址</td>
<td width="192" align="center">注备</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1" width="100%" style="border-collapse: collapse" id="table6" bordercolor="#FFFFFF">
<%for cw=1 to cwrs.pagesize
if cwrs.bof or cwrs.eof then exit for
%>
<tr>
<td width="82">
<p align="right"><b><font size="2"><%=cwrs("jj")%>¥</font></b></td>
<td width="93">
<p align="right"><b><font size="2"><%=cwrs("csj")%>¥</font></b></td>
<td width="93">
<p align="right"><b><font size="2"><%=cwrs("ly")%>¥</font></b></td>
<td width="135"><%=cwrs("year")%><%=cwrs("month")%><%=cwrs("day")%></td>
<form method="POST" action="">
<td>
<p align="center">
<textarea rows="1" name="S1" cols="13" style="border: 1px solid #0066FF; padding: 0; background-color:#0066FF"><%=cwrs("hour")%><%=cwrs("address")%></textarea></td>
<td width="192">
<p align="center">
<textarea rows="1" name="S2" cols="18" style="border: 1px solid #0066FF; background-color:#0066FF; padding-left:1px; padding-right:0; padding-top:0; padding-bottom:0"><%=cwrs("bz")%></textarea></td>
</form>
</tr>
<%
cwrs.movenext
next
end if
%>
</table>
</td>
</tr>
</table>
<p align="center">
<%
For zqy=1 To cwrs.PageCount
If zqy=dch_Page Then
Response.Write zqy &" "
Else
Response.Write "<a href='searh.asp?dch_Page="&zqy&"'>"&zqy&"</a>" &" "
End if
Next
%>
<select size="1" name="select" onchange="javascript:location=this.options[this.selectedIndex].value;">
<option value="第<%=dch_page%>页">第<%=dch_page%>页</option>
<%
for dch=1 to cwrs.pagecount
if dch<>dch_page then
%>
<option value=searh.asp?dch_page="<%=dch%>">第<%=dch%>页</option>
<%
end if
next
%>
</select> </p>
</td>
</tr>
<%
cwconn.close
set cwconn=nothing
%>