错误类型:
Microsoft JET Database Engine (0x80040E14)
FROM 子句语法错误。
/huiyuan/include/ADOFunction.asp, 第 9 行
网页:
POST 52 ??? /huiyuan/Checkpwd.asp
Checkpwd.asp程序为:
<!--#include file="include/ADOFunction.asp"-->
<%
id=Trim(request("id"))
password=Trim(request("password"))
if(id=""Or password="") Then
Response.Redirect"index.htm"
Response.End
End if
Dim strSQL,objRS
strSQL="select * from person where id="'&id&'""
strSQL=strSQL & "and password="'&password&'""
set objRS=GetSQLRecordset(strSQL,"data/data.mdb","Users")
if objRS.EOF Then
Response.Write"您的密码错误,请确定您的帐号或者密码是否正确"
Response.End
End if
Response.Cookies("id")=id
Response.Cookies("password")=password
Response.Redirect"Main.asp"
%>
ADOFunction.asp程序为
<%
Function GetSQLRecordset(strSQL,FileName,TableName)
'打开数据库连接
Set objConn=Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;"&"Data Source="&Server.MapPath(FileName)
objConn.open
'从表中读取记录并存放在Recordset对象
Set GetSQLRecordset=Server.CreateObject("ADODB.Recordset")
GetSQLRecordset.Open strSQL,objConn,1,3,2
End Function
Function GetRecordset(FileName,TableName)
'打开数据库连接
Set objConn2=Server.CreateObject("ADODB.Connection")
objConn2.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;"&"Data Source="&Server.MapPath(FileName)
objConn2.open
'从表中读取记录并存放在Recordset对象
Set GetRecordset=Server.CreateObject("ADODB.Recordset")
GetRecordset.Open FileName,objConn2,1,3,2
End Function
%>
请帮忙看看为什么会出现这个问题,谢谢了