我是初学者,现在想写个填写用户资料的页面,不过不能执行,下面是处理页面语句,请高手帮忙看看!
<% Set conn=Server.CreateObject("ADODB.Connection") Set rec=Server.CreateObject("ADODB.Recordset") conn.ConnectionString="Driver={Microsoft Access Driver (*.mdb)};Uid=;Pwd=;DBQ=" & Server.MapPath("register.mdb") conn.Open SQL="SELECT * FROM customer WHERE no='" & request("no") & "'" rec.Open SQL,conn,3,3
if rec.RecordCount=0 then Response.Write "<script language='javascript'>window.confirm('非法号码!');</script>" Response.Write "<script language='javascript'>parent.window.history.go(-1);</script>"
else rec.AddNew rec.Fields("no")=request("no") rec.Fields("name")=request("name") rec.Fields("sex")=request("sex") rec.Fields("mailcode")=request("mailcode") rec.Fields("address")=request("address") rec.Fields("phone")=request("phone") rec.Fields("handphone")=request("handphone") rec.Fields("fax")=request("fax") rec.Fields("email")=request("email") rec.Update rec.close Response.Write "<script language='javascript'>window.confirm('您的资料已成功提交,谢谢合作!!');</script>" Response.Write "<script language='javascript'>parent.window.history.go(-2);</script>" end if set rec=nothing set conn=nothing %>