#22002/8/2 11:48:26
sql = "select username,sex,age,pass,con,oicq,city,email,img from userinfo where username = '" & username & "'"
set conn = server.CreateObject("adodb.connection")
set rs = server.CreateObject("adodb.recordset")
conn.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE= " & server.MapPath("database/mem.mdb")
rs.Open sql,conn,1,3
if not rs.eof then
response.redirect "meg.asp?info=»áÔ±ÃûÒѱ»Ê¹Óã¬ÇëʹÓÃÆäËûÓû§Ãû!"
else
rs.addnew
rs("username") = username
rs("sex") = sex
rs("age") = age
rs("pass") = pass
rs("con") = con
rs("oicq") = oicq
rs("city") = city
rs("email") = email
rs("img") = head
rs.update
end if
rs.close
conn.close
set rs = nothing
set conn = nothing
这是我运行良好的代码,拷给你看看