<%
if Resquest ("action")="SaveWrite" Then Call SaveWrite()
End if
%>
<%
Sub SaveWrite()
Dim name
Dim sex
Dim papers
Dim papers-num
Dim nationality
Dim year1
Dim mouth1
Dim day1
Dim year2
Dim mouth2
Dim day2
Dim population
Dim tel
Dim type
Dim requirement
Set Rs=Server.CreateObject("ADODB.Recordset")
Sql="Select * Form(df)"
Rs.Open Sql,conn,1,3
name=Trim(Request.Form("name"))
sex=Trim(Request.Form("sex"))
papers=Trim(Request.Form("papers"))
papers-num=Trim(Request.Form("papers-num"))
nationality=Trim(Request.Form("nationality"))
year1=Trim(Request.Form("year1"))
mouth1=Trim(Request.Form("mouth1"))
day1=Trim(Request.Form("day1"))
year2=Trim(Request.Form("year2"))
mouth2=Trim(Request.Form("mouth1"))
day2=Trim(Request.Form("day2"))
population=Trim(Request.Form("population"))
tel=Trim(Request.Form("tel"))
type=Trim(Request.Form("type"))
requirement=Trim(Request.Form("requirement"))
Rs.Addnew
Rs("name")=name
Rs("sex")=sex
Rs("papers")=papers
Rs("papers-num")=papers-num
Rs("nationality")=nationality
Rs("year1")=year1
Rs("mouth1")=mouth1
Rs("day1")=day1
Rs("year2")=year2
Rs("mouth2")=mouth2
Rs("day2")=day2
Rs("population")=population
Rs("tel")=tel
Rs("type")=type
Rs("requirement")=requirement
Rs.Update
Rs.Close
Set Rs=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.Redirect(df.asp)
End if
End Sub
%>
这段代码有问题吗,为什么不能添加数据到ACCESS数据库粒里