asp写入数据库access出现错误!!!急求解决方法!!
<%
set conn=server.createobject( "adodb.connection ")
conn.open "provider=microsoft.jet.oledb.4.0;data source= "&server.mappath( "data/%xxddssaazzxx.mdb ")
set rs=server.CreateObject( "adodb.recordset ")
strsql= "select name,psw,YY,month,x,xl,addone_id,addtwo_id,xxdz,telq,tel,mail,qq from check "
rs.open strsql,conn,1,3
rs.addnew
rs( "name ")=Request.Form( "name ")
rs( "psw ")=Request.Form( "psw ")
rs( "YY ")=Request.Form( "YY ")
rs( "month ")=Request.Form( "month ")
rs( "x ")=Request.Form( "x ")
rs( "xl ")=Request.Form( "xl ")
rs( "addone_id ")=Request.Form( "addone_id ")
rs( "addtwo_id ")=Request.Form( "addtwo_id ")
rs( "xxdz ")=Request.Form( "xxdz ")
rs( "telq ")=Request.Form( "telq ")
rs( "tel ")=Request.Form( "tel ")
rs( "mail ")=Request.Form( "mail ")
rs( "qq ")=Request.Form( "qq ")
rs.update
rs.close
conn.close
%>
这些是输入数据库代码
=============================================================================================
运行后出现这样的错误!!
技术信息(用于支持人员)
错误类型:
Microsoft JET Database Engine (0x80040E14)
FROM 子句语法错误。
/sjxr.asp, 第 6 行
rs.open strsql,conn,1,3
本人第一次做网页那里错了请高手指教下!!
在线等答案!!
------解决方案--------------------check是关键字。。写成上[check]就可以了的
------解决方案--------------------命名建议:check-> tblCheck
------解决方案--------------------把
set rs=server.CreateObject( "adodb.recordset ")
strsql= "select name,psw,YY,month,x,xl,addone_id,addtwo_id,xxdz,telq,tel,mail,qq from check "
rs.open strsql,conn,1,3
rs.addnew
改为:
set rs=server.CreateObject( "adodb.recordset ")
strsql= "select * from check where id is null "
rs.open strsql,conn,1,3
rs.addnew()