<!--#include file="includes/GeneralTools.asp"-->
<!--#include file="includes/conn_SQLServer.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<title>登录</title>
</head>
<body>
<div align=center>
<%
dim strUserName
dim strPassword
strUserName = Request.Form("txtUserName")
strPassword = Request.Form("txtPassword")
call tackleEmpty(strUserName)
call tackleEmpty(strPassword)
call tacklePrime(strUserName)
call tacklePrime(strPassword)
call tackleOverLen(strUserName,15)
call tackleOverLen(strPassword,15)
call openDB()
sql="select USER_NAME from UserInfo where(USER_NAME='"&strUserName&"'"_
&"and PASSWORD='"&strPassword&"')"
rs.open.sql,conn,1,1 ////这里总是提示上面的错误,连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。不知原因何在
if not rs.eof then
session("UserName")=strUserName
showMsg("登录成功!<a href='default.asp'>返回首页</a></br>")
else
showMsg("登录失败!")
end if
call closeDB()
%>
</div>
</body>
</html>