Set conn=Server.CreateObject("ADODB.Connection")
Connstr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("db_DangJian.mdb")
conn.Open connstr
sql = ""
set rs = conn.execute(sql)
dim conn
Set conn = Server.Createobject("ADODB.Connection")
conn.Open "driver={SQL Server};server=服务器名;database=数据库名;uid=sa;pwd=密码"
sql = " select CustomerID,Password from M_PersonInfo "
Set rs=Server.Createobject("ADODB.Recordset")
rs.Open sql,conn,1,3
if rs.recordcount<>0 then
rs.movefirst
while not rs.bof and not rs.eof
response.write(rs("customerID"))
rs.movenext
wend
end if
rs.close
set rs =nothing
conn.close
set conn = nothing