主题:  大虾们帮帮小弟吧,好不容易找到这里来请教的!

vincentting

职务:普通成员
等级:1
金币:0.0
发贴:29
注册:2003/1/26 5:16:17
#12003/1/26 5:22:17
我做一个登陆页面.数据库连接什么都正常,到最后测试的时候转不到指定的页面,我觉得是数据库连接出错了,以下是报错的信息:
技术信息(用于支持人员)

错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E07)
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。
/vin1/login.asp, 第 35 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

网页:
POST 36 ??? /vin1/login.asp

POST Data:
account=1&pass=2&Submit=%CC%E1%BD%BB

时间:
2003年1月26日, 5:20:56


详细信息:
Microsoft 支持



缺缺

职务:管理员
等级:8
金币:41.0
发贴:9620
注册:2004/1/14 19:14:47
#22003/1/26 20:05:53
数据类型不匹配

你把SQL写出来看看,就是SELECT * 那一句



vincentting

职务:普通成员
等级:1
金币:0.0
发贴:29
注册:2003/1/26 5:16:17
#32003/1/27 15:46:42
*** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("account"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="control.asp"
MM_redirectLoginFailed="sorry.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_news_STRING
MM_rsUser.Source = "SELECT ID, account"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM admin WHERE ID='" & Replace(MM_valUsername,"'","''") &"' AND account='" & Replace(Request.Form("pass"),"'","''") & "'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open ************************************35行报错
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
%>

编辑历史:[这消息被vincentting编辑过(编辑时间2003-01-27 15:48:49)]


vincentting

职务:普通成员
等级:1
金币:0.0
发贴:29
注册:2003/1/26 5:16:17
#42003/1/27 16:21:52
谢谢"allinhands"可以了,成功了,谢谢你给我提醒!