可以理解,这是一个普遍的错误。但是,浏览其他内容并没有为我提供太多有用的信息。
这是代码:
<%@ Language=VBScript %>
<%
' variable listing and usage
DIM conx ' connection object to the server
DIM comd ' instance of a command object
DIM bookingsql ' string variable to hold the SQL commands
DIM itemsAdded ' numeric var to hold num records added to table (1 or 0)
DIM dbpath ' path to the database file
set conx=server.CreateObject("ADODB.connection")
conx.Provider="Microsoft.ACE.OLEDB.12.0"
dbpath = Server.Mappath("database/thrus.mdb")
conx.Mode = 3 ' adModeReadWrite
conx.Open dbpath ' open the database
set comd=server.CreateObject("ADODB.Command")
comd.ActiveConnection=conx
bookingsql="INSERT INTO booking (boo_UserID, boo_PerID, boo_SeaID) VALUES('" &_
session("usr_ID") & "','" & _
request("performanceid") & "','" & _
request("firstSeat")& "')"
comd.CommandText=bookingsql
comd.Execute itemsAdded
conx.close
set conx=nothing
set comd=nothing
%>
代码也在这里。
我收到错误:
Microsoft Access Database Engine error '80040e07'
Data type mismatch in criteria expression.
/STUDENT/s0191958/PART2/bookprocess.asp, line 33
现在第 33 行很简单
comd.Execute itemsAdded
所以我相信它可能与 items added 命令有关,但实际上与命令无关。如果您需要更多信息,请告诉我我可以如何帮助您 - 帮助我:D
谢谢