链接数据库问题,求大神看看帮我指点一下,本人新手
程序代码:
<html> <head> <title>注册</title> <meta name="genertor" content="Micsoft FontPage4.0" > <base target="_self" > <meta name="Micsoft Theme" content="sumipntg 000,default" > </head> <body leftmargin="0" topmargin="0" bgcolor="#ffffff" text="#000066" link="#3333cc" vlink="#666699" alink="#990099"> <table align="center" border="0" cellpadding="0" cellspacing="0" class="c" width="760"> <tr> <td width="100%" height="197" align="center"> <table border="0" cellpadding="0" cellspacing="0" height="85" bgcolor="#eeeeee" width="100%"> <tr> <td align="center"> <% truename=Request.Form("truename") dep=Request.Form("dep") pw1=Request.Form("passwd1") pw2=Request.Form("passwd2") name=Request.Form("name") if name="" then %> <script language="javascript"> alert("昵称不能为空!") document.location="javascript:history.back(-1)" </script> <% else set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("manage.mdb") set rs=server.createobject("adodb.recordset") sql="select * from user where name='"& name &"'" rs.open sql,conn if not rs.eof then %> <script language="javascript"> alert("该用户已存在,请重新输入!") document.location="javascript:history.back(-1)" </script> <% response.End() end if end if session("name")=name if truename="" then %> <script language="javascript"> alert("姓名不能为空!") document.location="javascript:history.back(-1)" </script> <% response.End() elseif dep="" then %> <script language="javascript"> alert("部门不能为空!") document.location="javascript:history.back(-1)" </script> <% response.End() elseif(pw1=""or pw1<>pw2) then %> <script language="javascript"> alert("两次输入的密码不一致,请重新输入!") document.location="javascript:history.back(-1)" </script> <% response.End() else session("name")=name session("truename")=truename session("dep")=dep session("passwd1")=pw1 end if set conn=server.createobject("adodb.connection") conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("manage.mdb") set rs=server.createobject("adodb.recordset") sql="select * from user where name='"& name &"' and passwd='"& passwd &"'" rs.open sql,conn if rs.eof then sql1="insert into user(name,truename,dep,passwd) values('"& name &"','"& truename &"','"& dep &"','"& pw1 &"')" conn.Execute(sql1) response.Redirect"addnew1.asp" end if %> </p> </td> </tr> </table> </td> </tr> </table> </body> </html>大神帮我看看下面链接到数据库存入数据库哪里有错啊。