主题:  今天MX2004见鬼ActiveConnection老出错

亦歌

职务:普通成员
等级:2
金币:1.0
发贴:350
#12004/5/25 0:44:59
Microsoft VBScript 编译器错误 错误 '800a03f6'

缺少 'End'

/iisHelp/common/500-100.asp,行242

Microsoft JET Database Engine 错误 '80004005'

不能使用 '';文件已在使用中。

/wei/news/login.asp,行28
---------------------------------------
代码如下:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../Connections/wei.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_wei_STRING
Recordset1.Source = "SELECT * FROM admin"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
' *** 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("textfield"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="windows.htm"
MM_redirectLoginFailed="door.htm"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_wei_STRING
MM_rsUser.Source = "SELECT w_name, w_password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE w_name='" & Replace(MM_valUsername,"'","''") &"' AND w_password='" & Replace(Request.Form("textfield2"),"'","''") & "'"
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
%>
----------------------
主要是提示这个东西Recordset1.ActiveConnection = MM_wei_STRING无法出现两次!但是以前我在一个页面中Recordset两个都没有事的,但今天在首页做却不行....我想知道是我的电脑问题还是代码问题。。。。
------------------------
主要是想调用两个Recordset....高手帮我呀!


--------------------------------------------------------------------------------
THinker



亦歌

职务:普通成员
等级:2
金币:1.0
发贴:350
#22004/6/14 21:41:52
有人懂吗?



咬一口

职务:普通成员
等级:1
金币:0.0
发贴:107
#32004/6/21 11:40:59
把页面的东东都删除了。重新做一遍吧