一个特别简单的问题,为什么我找不出错来了? 大家帮帮忙!! 谢谢!
以下是代码:<!--#include file="conn.asp"-->
<% response.Buffer=true %>
<%
if request.form("bianhao")="" or request.form("chepai")="" or request.form("danwei")="" then
response.write "<script language=javascript>history.back();alert('带 * 项必须填写!');</script>"
response.end
end if
%>
<%
strsql="select * from StudentInfo where name='" & request.form("chepai") & "'"
set rs=server.CreateObject("adodb.recordset")
rs.open strsql,db,3,3
if not(rs.eof or rs.bof) then
rs.close
set rs=nothing
db.close
set db=nothing
response.write "<script language=javascript>history.back();alert('对不起,该车牌号已经存在!');window.close();</script>"
response.end
end if
dim mysql, company,chepai,model,color,engine,driver,telnum,parkingspce,n,remark
Company=request.form("danwei")
chepai=request.form("chepai")
Model=request.form("xinghao")
Color=request.form("yanse")
Engine=request.form("fadongjihao")
Driver=request.form("jiashiyuan")
TelNum=request.form("dianhua")
Parkingspace=request.form("chewei")
N=request.form("bianhao")
Remark=request.form("beizhu")
mysql="insert into StudentInfo(Company,Name,Model,Color,Engine,Driver,TelNum,Parkingspace,Number,Remark) values('"&company&"','"&chepai&"','"&Model&"','"&Color&"','"&Engine&"','"&Driver&"','"&TelNum&"','"&Parkingspace&"','"&N&"','"&Remark&"')"
db.execute(mysql)
set db=nothing
db.close
set db=nothing
response.write "<script language=javascript>history.back();alert('车辆登记成功');</script>"
%>
错误提示:
错误类型:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] INSERT INTO 语句的语法错误。
/infoinput1.asp, 第 33 行
大家帮帮忙,谢谢了!