请教个问题
我做了denglu.asp,是个登陆页面,浏览没有问题,但是在用户名和密码里输入以后点登陆就会出现错误错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC 驱动程序管理器] 驱动程序的 SQLSetConnectAttr 失败
代码是
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/admin.asp" -->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("user"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="true.asp"
MM_redirectLoginFailed="error.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_admin_STRING
MM_rsUser.Source = "SELECT 编号, admin"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE 编号='" & Replace(MM_valUsername,"'","''") &"' AND admin='" & Replace(Request.Form("password"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www. InstanceBegin template="/Templates/index.dwt.asp" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>无标题文档</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="168个网页Banner/002.jpg" width="770" height="200" /></td>
</tr>
</table>
<table width="770" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="187"><table width="187" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="本书实例源文件及最终文件/原始文件/ch4/00.jpg" width="200" height="150" /></td>
</tr>
<tr>
<td><img src="本书实例源文件及最终文件/原始文件/ch4/1.jpg" width="200" height="150" /></td>
</tr>
<tr>
<td><img src="本书实例源文件及最终文件/原始文件/ch4/51.jpg" width="200" height="150" /></td>
</tr>
<tr>
<td><img src="本书实例源文件及最终文件/原始文件/ch4/t]2.jpg" width="200" height="150" /></td>
</tr>
</table></td>
<td width="545" valign="top"><!-- InstanceBeginEditable name="zhengwen" -->
<form ACTION="<%=MM_LoginAction%>" id="form1" name="form1" method="POST">
<table width="40%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td colspan="2">登陆</td>
</tr>
<tr>
<td>用户名</td>
<td><input name="user" type="text" id="user" size="12" /></td>
</tr>
<tr>
<td>密码</td>
<td><input name="password" type="password" id="password" size="12" /></td>
</tr>
<tr>
<td>?</td>
<td><input type="submit" name="Submit" value="提交" />
<input type="reset" name="Submit2" value="重置" /></td>
</tr>
</table>
</form>
<!-- InstanceEndEditable --></td>
<td width="38">?</td>
</tr>
</table>
</body><!-- InstanceEnd -->
</html>
我是新手,请高手帮忙分析下,谢谢了.