标题:[求助]Set rs = conn.Execute的问题
取消只看楼主
lloveyou_hlf
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2006-3-16
 问题点数:0 回复次数:0 
[求助]Set rs = conn.Execute的问题

<!--#include file="db.asp"-->

<%
validpwd = true

If request.form("submit") <> "" Then

' setup variables
userid = Request.Form("userid")
passwd = Request.Form("passwd")
set conn=Server.CREATEOBJECT("ADODB.CONNECTION")
conn.open(dbConnStr)
Set rs = conn.Execute( "Select * from [admin] where [user_id] = '" & UCASE("userid") & "'")

If not rs.eof then
If ucase(rs("user_pwd")) = ucase(passwd) Then
validpwd = true
Else
validpwd = false
End If
Else
validpwd = false
end if
lev=rs("lev")
user=rs("user_id")
rs.Close
Set rs=Nothing
conn.Close
Set conn=Nothing

If validpwd Then
Session("exemple_status") = "login"
session("lev")=lev
session("u_id")=user
response.redirect "default.asp"
End If

End If
%>


以上是登录的代码,连接的是sql server数据库,就是登录页不行,其它的可以,好像是这行
Set rs = conn.Execute( "Select * from [admin] where [user_id] = '" & UCASE("userid") & "'")
请那位高手指教,谢谢

搜索更多相关主题的帖子: Set Execute conn 
2006-03-16 13:04



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-50768-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.362028 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved