<!--#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") & "'")
请那位高手指教,谢谢

 
											





