ASP代码把数据提交到数据库
请高手看下下面的代码有没有什么问题,我从一个表单提交到这个页的时候就提示"您要访问的网页有问题,无法显示。"
我找不到问题在哪,帮帮忙啊!!
<% Option Explicit %>
<%
If Request.Form("user")<>"" And Request.Form("pwd1")=Request.form("pwd2")"" And Request.Form("name")<>"" Then
'以下连上数据库,建立一个Connection对象实例db
Dim db
Set db=Server.CreateObject("ADODB.Connection")
db.Open "Dbq="&Server.Mappath("wwwlink.mdb")&";Driver={Microsoft Access Driver (*.mdb)};"
Dim strSql,varUesr,varPwd,varName,varSex,varQq,varId,varSj
varUesr=Request.Form("uesr")
varPwd=Request.Form("pwd1")
varName=Request.Form("name")
varSex=Request.form("易做图")
varQq=Request.form("qq")
varId=Request.form("id")
varSj=Request.form("sj")
StrSql="Insert Into reg (uesr,pwd1,name,易做图,qq,id,sj,submit_date) Values('" & varUesr & "','" & varPwd & "','" & varName & "','" & varSex & "','" & varQq & "','" & varId & "','" & varSj & "',#" & Date() & "#)"
db.Execute(strSql)
Response.Redirect "index.asp"
Else
Response.Write "请将所有信息填写完整,"
Response.Write "<a href='index.asp'>重新添加</a>"
End If
%>