[求助]向数据库里添加数据的问题
我向数据库里添加数据这个代码不可以啊
哪位帮我看看差到哪了/????
<%
uid=Request.Form("uid")
upwd=Request.Form("upwd")
email=Request.Form("email")
conn="provider=microsoft.jet.oledb.4.0;data source=C:\Inetpub\wwwroot\lb\db1.mdb;persist security info=false"
set strconn=Server.CreateObject("adodb.connection")
strconn.open conn
set objrs=Server.CreateObject("adodb.recordset")
objrs.Open "select *from lxr where uid='"&uid&"'",conn
if not objrs.eof then
addnew
objrs(0)=uid
objrs(1)=upwd
objrs(2)=email
update
Response.Write ("<script language=javascript>alert('有相同用户名');</script>")
Response.Redirect"reg.asp"
else Response.Write("<script language=javascript>alert('有相同用户名');</script>")
Response.Redirect"reg.asp"
end if
%>