index.htm)
Untitled Document(add.asp)
<%
dim conn
dim sqlconn
dim name
dim adr
Set conn=Server.CreateObject("ADODB.Connection")
sqlconn="DRIVER={MicroSoft Access Driver(*.mdb)};DBQ="& Server.MapPath("list.mdb")
conn.open sqlconn
name=request.form("name")
adr=request.form("adr")
rs=Server.CreateObject("ADODB.Recordset")
sql="select * from list"
rs.open sql,conn,1,3
rs.addnew
rs"name"=name
rs"adr"=adr
rs.update
response.write"您的数据添加成功"
rs.close
conn.close
%>