set Conn=server.createobject("adodb.Connection")
conn.open="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("date/xhbook.mdb")
set rs=server.createobject("adodb.recordset")
name = Request.Form("name")
passwd = Request.Form("passwd")
set rs = server.CreateObject("adodb.recordset")
rs.Open"select name,passwd,type,visitnum from usertype where name ='"&name&"'",conn,1,1
对了,为什么这样换就可以了,
sql = "select name,passwd,type from usertype where name =’" & name & "’"
set conn = server.CreateObject("adodb.connection")
conn.open "driver={microsoft access driver (*.mdb)};dbq="&server.mappath("date/xhbook.mdb")
set rs = server.CreateObject("adodb.recordset")
rs.Open sql,conn
这不是数据库连接吗?