我的代码是这样的:
<!--#INCLUDE FILE="ADOVBS.INC"-->
<%
A_Time=Request.Form("A_Time")
A_Place=Request.Form("A_Place")
A_Personnel=Request.Form("A_Personnel")
A_Event=Request.Form("A_Event")
A_Sort=Request.Form("A_Sort")
A_Car=Request.Form("A_Car")
A_Result=Request.Form("A_Result")
A_Remark=Request.Form("A_Remark")
str_AddWR="INSERT INTO dmtWR(Time,Place,Personnel,Event,Sort,Car,Result,Remark) VALUES('"
str_AddWR=str_AddWR &A_Time&
"','"
str_AddWR=str_AddWR &A_Place&
"','"
str_AddWR=str_AddWR &A_Personnel&
"','"
str_AddWR=str_AddWR &A_Event&
"','"
str_AddWR=str_AddWR &A_Sort&
"','"
str_AddWR=str_AddWR &A_Car&
"','"
str_AddWR=str_AddWR &A_Result&
"','"
str_AddWR=str_AddWR &A_Remark&
"')"
set Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" _
&
Server.Mappath("../../dmtWRDB/dmtWRDB.mdb")
set RS=Server.CreateObject("ADODB.RecordSet")
RS.Open strAddWR,Conn
RS.Close
Conn.Close
…………
%>
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。