我写了一个脚本,更新数据库的。运行后什么反应也没有,真不知道到底错在什么地方,各位.帮我看看错在哪了,谢谢了!
<!--#include file="conn.asp"-->
<%
dim str
dim jb
dim dyc
dim drc
dim dsc
dim bj
'------------------------------------------------------------------------------------------------'
if request("jb") = "尚未交办" then
jb = "1900-1-1"
else
jb = request("jb")
end if
if request("dyc") = "未进行" then
dyc = "1900-1-1"
else
dyc = request("dyc")
end if
if request("drc") = "未进行" then
drc = "1900-1-1"
else
drc = request("drc")
end if
if request("dsc") = "未进行" then
dsc = "1900-1-1"
else
dsc = request("dsc")
end if
if request("bj") = "处理中......" then
bj = "1900-1-1"
else
bj = request("bj")
end if
'------------------------------------------------------------------------------------------------'
if request("temp") = "add" then
str = "select * from jc_jb order by updatetime desc"
elseif request("temp") = "up" then
str = "select * from jc_jb where id = "& request("id")
end if
if request("temp") = "add" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open str,Conn,1,3
rs.addnew
rs("jbr") = request("jbr")
rs("sex") = request("sex")
rs("jbfs") = request("jbfs")
rs("lxdh") = request("lxdh")
rs("jbtsnr") = request("jbtsnr")
rs("dw") = request("dw")
rs("reg") = request("reg")
rs("bjbr") = request("bjbr")
rs("jbsj") = request("jbsj")
rs("jb") = "1900-1-1"
rs("cbdw") = "未处理"
rs("cbr") = "未处理"
rs("dyc") = "1900-1-1"
rs("drc") = "1900-1-1"
rs("dsc") = "1900-1-1"
rs("dbqk") = "未处理"
rs("bljg") = "未处理"
rs("blr") = "未处理"
rs("bj") = "1900-1-1"
rs("updatetime") = now
rs.update
end if
if request("temp") = "up" then
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open str,Conn,1,3
rs("jbr") = rs("jbr")
rs("sex") = rs("sex")
rs("jbfs") = rs("jbfs")
rs("lxdh") = rs("lxdh")
rs("jbtsnr") = rs("jbtsnr")
rs("dw") = rs("dw")
rs("reg") = rs("reg")
rs("bjbr") = rs("bjbr")
rs("jbsj") = rs("jbsj")
rs("jb") = jb
rs("cbdw") = request("cbdw")
rs("cbr") = request("cbr")
rs("dyc") = dyc
rs("drc") = drc
rs("dsc") = dsc
rs("dbqk") = request("dbqk")
rs("bljg") = request("bljg")
rs("blr") = request("blr")
rs("bj") = bj
rs("updatetime") = now
rs.update
end if
if request("cl") = "now" then%>
<meta http-equiv="refresh" content="1; url=tsadd.asp?temp=up&id=<%=rs("id")%>;">
<%else%>
<meta http-equiv="refresh" content="1; url=tsjb.asp;">
请稍候......<%=k%><%end if%>