标题:asp+access插入问题
取消只看楼主
hqhb
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-7-29
结帖率:0
已结贴  问题点数:20 回复次数:0 
asp+access插入问题
我是用dw asp+access制作动态页的,在插入记录的时候就提示:

Microsoft JET Database Engine 错误 '80040e14'

INSERT INTO 语句的语法错误。

/zhuce1.asp,行 37

第37 行是:
MM_editCmd.Execute

我也制作了另一个页面,也是插入记录的,步骤也是用 服务器行为插入记录的,但可以正常插入,
可是在这个网页就提示上述错误,是为什么啊,急于求高手解决,
dw生成的部分代码如下:(本人只懂操作,不懂代码)
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
If (CStr(Request("MM_insert")) = "form1") Then
  If (Not MM_abortEdit) Then
    ' execute the insert
    Dim MM_editCmd

    Set MM_editCmd = Server.CreateObject (")
    MM_editCmd.ActiveConnection = MM_cnn2_STRING
    MM_ = "INSERT INTO zczl (username, password, qx, zswt, da, sex, szdw, addr, yb, tel, cz, yx, wz) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
    MM_editCmd.Prepared = true
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param1", 202, 1, 50, Request.Form("username")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param2", 202, 1, 50, Request.Form("password")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param3", 202, 1, 50, Request.Form("qx")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param4", 202, 1, 50, Request.Form("zswt")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param5", 202, 1, 50, Request.Form("da")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param6", 202, 1, 50, Request.Form("sex")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param7", 202, 1, 50, Request.Form("szdw")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param8", 202, 1, 50, Request.Form("addr")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param9", 202, 1, 50, Request.Form("yb")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param10", 202, 1, 50, Request.Form("tel")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param11", 202, 1, 50, Request.Form("cz")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param12", 202, 1, 50, Request.Form("yx")) ' adVarWChar
    MM_editCmd.Parameters.Append MM_editCmd.CreateParameter("param13", 202, 1, 50, Request.Form("wz")) ' adVarWChar
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    ' append the query string to the redirect URL
搜索更多相关主题的帖子: Microsoft Request 服务器 record false 
2016-07-29 17:04



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-467362-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.115772 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved