大哥大姐们救命啊!!!
<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--#include file="include/top.asp"-->
<!--#include file="conn.asp"-->
<link href="images/style.css" rel="stylesheet" type="text/css">
<%
Function GetSafeStr(str)
'Get1SafeStr = Replace(Replace(Replace(Trim(str), "'", ""), Chr(34), ""), ";", "")
GetSafeStr = Replace(Replace(Replace(Replace(Replace(str,"'","‘"),"""","“"),"&",""),"<","<"),">",">")
End Function
%>
<%
zch=GetSafeStr(Request.Form("zch"))
dwmc=GetSafeStr(Request.Form("dwmc"))
frdb=GetSafeStr(Request.Form("frdb"))
dwdz=GetSafeStr(Request.Form("dwdz"))
gxdw=GetSafeStr(Request.Form("gxdw"))
sfnx=GetSafeStr(Request.Form("sfnx"))
cys=GetSafeStr(Request.Form("cys"))
nhs=GetSafeStr(Request.Form("nhs"))
yye=GetSafeStr(Request.Form("yye"))
lnxypj=GetSafeStr(Request.Form("lnxypj"))
ryl=GetSafeStr(Request.Form("ryl"))
sbh=GetSafeStr(Request.Form("sbh"))
yhxd=GetSafeStr(Request.Form("yhxd"))
gyhd=GetSafeStr(Request.Form("gyhd"))
xyxl=GetSafeStr(Request.Form("xyxl"))
grry=GetSafeStr(Request.Form("grry"))
xjqz=GetSafeStr(Request.Form("xjqz"))
sqbg=GetSafeStr(Request.Form("sqbg"))
jyhd=GetSafeStr(Request.Form("jyhd"))
yyzz=GetSafeStr(Request.Form("yyzz"))
zkxkz=GetSafeStr(Request.Form("zkxkz"))
dxxkz=GetSafeStr(Request.Form("dxxkz"))
dxyyzz=GetSafeStr(Request.Form("dxyyzz"))
wfzatl=GetSafeStr(Request.Form("wfzatl"))
zjxszr=GetSafeStr(Request.Form("zjxszr"))
xszr=GetSafeStr(Request.Form("xszr"))
pcjs=GetSafeStr(Request.Form("pcjs"))
hmd=GetSafeStr(Request.Form("hmd"))
jzcn=GetSafeStr(Request.Form("jzcn"))
lnjdpj=GetSafeStr(Request.Form("lnjdpj"))
jcxy=GetSafeStr(Request.Form("jcxy"))
xyls=GetSafeStr(Request.Form("xyls"))
df=GetSafeStr(Request.Form("df"))
dj=GetSafeStr(Request.Form("dj"))
set rs=server.createobject("adodb.recordset")
sql="select * from 2008 where (id is null)"
rs.open sql,conn,1,3
rs.addnew
rs("zch")=zch
rs("dwmc")=dwmc
rs("frdb")=frdb
rs("dwdz")=dwdz
rs("gxdw")=gxdw
rs("sfnx")=sfnx
rs("cys")=cys
rs("nhs")=nhs
rs("yye")=yye
rs("lnxypj")=lnxypj
rs("ryl")=ryl
rs("sbh")=sbh
rs("yhxd")=yhxd
rs("gyhd")=gyhd
rs("xyxl")=xyxl
rs("grry")=grry
rs("xjqz")=xjqz
rs("sqbg")=sqbg
rs("jyhd")=jyhd
rs("yyzz")=yyzz
rs("zkxkz")=zkxkz
rs("dxxkz")=dxxkz
rs("dxyyzz")=dxyyzz
rs("wfzatl")=wfzatl
rs("zjxszr")=zjxszr
rs("xszr")=xszr
rs("pcjs")=pcjs
rs("hmd")=hmd
rs("jzcn")=jzcn
rs("lnjdpj")=lnjdpj
rs("jcxy")=jcxy
rs("xyjl")=xyjl
rs("xyls")=xyls
rs("df")=df
rs("dj")=dj
'rs("ip")=Request.serverVariables("REMOTE_ADDR")
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
response.write "<script language='javascript'>" & chr(13)
response.write "alert('添加成功!');" & Chr(13)
response.write "window.document.location.href='index.asp';"&Chr(13)
response.write "</script>" & Chr(13)
Response.End
%>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="783" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#006600">
<tr>
<td><p align="center"> </p>
</td>
</tr>
</table>
</body>
<!--#include file="include/bottom.asp"-->
</html>
为什么添加不进去呢?数据库里面没数据,如果写的字段少一些的话,可以成功