<!--#include file="conn.asp"-->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>基本情况保存</title>
</head>
<body>
<p>
<%
set conn=server.createobject("adodb.connection")
DBPath = Server.MapPath("db/sllj.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs = Server.CreateObject("ADODB.Recordset")
%>
<%
mingzi=request.form("name")
oldname=request.form("oldname")
minzu=request.form("minzu")
shengri=request.form("shengri")
gztime=request.form("gztime")
zptime=request.form("zptime")
gongzhong=request.form("gongzhong")
zzmm=request.form("zzmm")
rdtdate=request.form("rdtdate")
rdtadd=request.form("rdtadd")
stzhk=request.form("stzhk")
wgdw=request.form("wgdw")
dwphone=request.form("dwphone")
homeadd=request.form("homeadd")
homephone=request.form("homephone")
jiguan=request.form("jiguan")
telephone=request.form("telephone")
chushengdi=request.form("chushengdi")
hukou=request.form("hukou")
hetongid=request.form("hetongid")
sql="select * from jbqk"
rs.open sql,conn,3,2
rs.addnew
rs("name")=mingzi
rs("oldname")=oldname
rs("minzu")=minzu
rs("shengri")=shengri
rs("gztime")=gztime
rs("zptime")=zptime
rs("gongzhong")=gongzhong
rs("zzmm")=zzmm
rs("rdtdate")=rdtdate
rs("rdtadd")=rdtadd
rs("stzhk")=stzhk
rs("wgdw")=wgdw
rs("dwhpone")=dwphone
rs("homeadd")=homeadd
rs("homephone")=homephone
rs("jiguan")=jiguan
rs("telephone")=telephone
rs("chushengdi")=chushengdi
rs("hukou")=hukou
rs("hetongid")=hetongid
rs.update
rs.close
response.redirect "xlyb.asp"
%>
</p>
</body>
</html>
save.asp文件
dim conn
set conn=Server.createobject("adodb.connection")
conn.open "provider=microsoft.jet.oledb.4.0;data source="&server.mappath("db/sllj.mdb")
If err.number<>0 then
Response.write("连接数据库时产生错误!")
Response.End
End if
%>
conn.asp文件
错误提示见图片,帮忙看一下怎么改!
[此贴子已经被作者于2007-6-22 14:37:42编辑过]