|
语法错误 (操作符丢失) 在查询表达式 'jl.u_number=28 and jl.d_number=dept.d_number and date becneen 2008-3-1 and 2008-4-1' 中。
/bysj/jl2.asp, 第 18 行
可是这几个变量明明都已经收到值了,请问这个是怎么回事???哪位高手告诉一下,谢谢!!!
<!--#include file="conn.asp"-->
<%
dim u_number, date1, date2
u_number=trim(request("u_number"))
date1=trim(request("date1"))
date2=trim(request("date2"))
if u_number="" then
response.write "输入不能为空"
response.end
end if
set rst=server.createobject("adodb.recordset")
sql="select * from jl, dept where jl.u_number="&u_number&" and jl.d_number=dept.d_number and date becneen "&date1&" and "&date2&" order by date asc"
rst.open sql,conn,1,1
%>
<html>
<head>
<title>查看奖励信息</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<!--#include file="top.asp"-->
<p>
<%
if Not(rst.bof and rst.eof) then'判别数据表中是否为空记录
NumRecord=rst.recordcount
rst.pagesize=10
NumPage=rst.Pagecount
if request("page")=empty then
NoncePage=1
else
if Cint(request("page"))<1 then
NoncePage=1
else
NoncePage=request("page")
end if
if Cint(Trim(request("page")))>Cint(NumPage) then NoncePage=NumPage
end if
else
NumRecord=0
NumPage=0
NoncePage=0
end if
%>
<table width="100%" border="1" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td colspan="10" align="center" height="30">奖励信息</td>
</tr>
<tr>
<td width="10%">员工编号</td>
<td width="10%">员工姓名</td>
<td width="10%">所在部门</td>
<td width="10%">奖励原因</td>
<td width="10%">奖励金额</td>
<td width="10%">是否发放</td>
<td width="10%">部门意见</td>
<td width="10%">奖励时间</td>
<td width="10%" align="center">修改</td>
<td width="10%" align="center">删除</td>
</tr>
<%if Not(rst.bof and rst.eof) then
rst.move (Cint(NoncePage)-1)*10,1
for i=1 to rst.pagesize
%>
<tr>
<td align="center"><%=rst("u_number")%>;</td>
<td align="center"><%=rst("u_name")%></td>
<td align="center"><%=rst("d_name")%></td>
<td align="center"><%=rst("typ")%></td>
<td align="center"><%=rst("prize")%></td>
<td align="center"><%=rst("sff")%></td>
<td align="center"><%=rst("yj")%></td>
<td align="center"><%=rst("date")%></td>
<td align="center">修改</td>
<td align="center">删除</td>
</tr>
</table>
<% rst.movenext
if rst.eof then exit for
next
else
response.write "<tr><td colspan=10><marquee scrolldelay=120 behavior=alternate>没有找到任何记录!!!</marquee></td></tr>"
end if
rst.close
set rst=nothing
%>
<table width="748" border="0" align="center">
<tr>
<td height="17">
<div align="right">
<input type="hidden" name="page" value="<%=NoncePage%>">
<%
if NoncePage>1 then
response.write "|<a href=jl2.asp?page=1>首 页</a>| |<a href=jl2.asp?page="&NoncePage-1&">上一页</a>| "
else
response.write "|首 页| |上一页| "
end if
if Cint(Trim(NoncePage))<Cint(Trim(NumPage)) then
response.write "|<a href=jl2.asp?page="&NoncePage+1&">下一页</a>| |<a href=jl2.asp?page="&NumPage&">尾 页</a>|"
else
response.write "|下一页| |尾 页|"
end if
%>
页次:<font color="#0033CC"><%=NoncePage%></font>/<font color="#0033CC"><%=NumPage%></font>
共<font color="#0033CC"><%=NumRecord%></font>条记录 </div></td>
</table>
</body>
</html> |
|