初学菜鸟,数据库(sql)连接的问题,请大侠进来看看
dim strName
dim strPwd
dim strQx
strName = Request.form("text1")
strPwd = Request.form("pwd")
strQx = Request.form("qx")
sql = "select yh_xm,yh_mm,yh_qx from yonghu where yh_xm='text1' & yh_mm='pwd'"'就是这句出错
dim conn'连接数据库
set conn=server.createobject("ADODB.connection")
conn.open "PROVIDER=SQLOLEDB;DATA SOURCE=192.168.0.1;UID=aa;PWD=aa;DATABASE=kfgl"
set rs=server.createobject("adodb.recordset") '建立记录集
rs.open sql.conn'不知这句是什么意思??
if rs.EOF then
response.write "错误的用户名及密码"
rs.close
set rs = nothing
conn.close
set conn = nothing
response.end
end if
if not(rs("yh_mm")=pwd) then
response.write "错误的用户名及密码"
rs.close
set rs = nothing
conn.close
set conn = nothing
response.end
end if
'错误提示如下:
'Microsoft VBScript 运行时错误 错误 '800a01a8'
'缺少对象: 'rs'