if FoundErr<>True then
password=md5(password)
set rs=server.createobject("adodb.recordset")
sql="select * from [Admin] where password='"&password&"' and username='"&username&"'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用户名!!!</li>"
else
if password<>rs("password") then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>密码错误!!!</li>"
else
这段话哪里有问题呀?
sql语句执行没有问题,可是就是没有数据,数据库里也有数据呀?
到底是什么问题?
password=md5(password)
set rs=server.createobject("adodb.recordset")
sql="select * from [Admin] where password='"&password&"' and username='"&username&"'"
rs.open sql,conn,1,3
if rs.bof and rs.eof then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>用户名!!!</li>"
else
if password<>rs("password") then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>密码错误!!!</li>"
else
这段话哪里有问题呀?
sql语句执行没有问题,可是就是没有数据,数据库里也有数据呀?
到底是什么问题?
解决方案 »
- adodc設置有錯嗎?
- 怎么判断是不是笔记本啊
- 后鸟的下线
- 求教!在VB中写informix中的insert into语句?
- 十万火急,请问,为何在ScriptControl中,不能使用程序中赋值的变量?
- 关于Form_Load中访问控件Visible属性的问题!
- 请教:我在vb中调用SQL SERVER的存储过程,存储过程中有RETURN(0)这一句,在VB中如何得到这个 0 ?
- 如果我不知道某DLL的函数原型,但知道类名和函数名,可以在VB使用该DLL吗?怎么用?
- 咋会事儿呀?
- 提问......(送分啦) 另外:怎么给29分以外的分数?
- 我要用VB+ACCESS制作一个通讯录
- 用VB6.0写的系统在vs2005下怎么打开
set conn=server.CreateObject("adodb.connection")
conn.open connstr
dim admin_name,admin_pwd
admin_name=request("admin_name")
admin_pwd=request("admin_pwd")
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin where admin_name like'"&admin_name&"' and admin_pwd like'"&admin_pwd&"'"
rs.open sql,conn,1,3
If rs.recordcount < 1 then
response.write "登陆错误,请返回<a href=admin.asp>登陆页面再试</a>"
else
response.redirect "*.asp"
end if
我也是个菜鸟,跟高手学的,可能有用