数据库里有数据,可是却不执行这段,请高手帮忙!
<%sj=Trim(Request("sj"))
dw=Trim(Request("dw"))
Set Rs=Server.CreateObject("Adodb.RecordSet")
Sql="Select * From leiji Where dw='"&Request("dw")&"' and sj='"&Request("sj")&"'"
Rs.Open Sql,Conn,1,1
if not rs.eof then
%>
<script language=javascript>
if(!window.confirm("警告:本月本车的累积数据已经存在,覆盖后不能恢复,您确定要覆盖以前的数据吗?")) {
history.back();
}
</script>
<%
count=request("count")
for i=1 to count
rs("dw")=trim(request.Form("dw")(i))
rs("zylljs")=trim(request.Form("zylljs")(i))
rs("zylljd")=trim(request.Form("zylljd")(i))
rs("zjelj")=trim(request.Form("zjelj")(i))
rs("ch")=trim(request.Form("ch")(i))
rs("zylklj")=trim(request.Form("zylklj")(i))
rs("zselj")=trim(request.Form("zselj")(i))
rs("sj")=trim(request.Form("sj")(i))
rs.update
next
rs.close
Set Rs=Nothing
Response.Write "<script>alert('修改成功!');</script>"
end if
%>