标题:求教MM_editCmd.Execute错误问题
只看楼主
Helen_SD
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2012-3-23
 问题点数:0 回复次数:1 
求教MM_editCmd.Execute错误问题
本人用DW做ASP动态网站。在连接好数据库提交表单时发现错误,指出错误一行为MM_editCmd.Execute,哪位亲可以帮我解释下这是怎么回事么?附代码如下:
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

  ' create the sql insert statement
  MM_tableValues = ""
  MM_dbValues = ""
  For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
    MM_formVal = MM_fields(MM_i+1)
    MM_typeArray = Split(MM_columns(MM_i+1),",")
    MM_delim = MM_typeArray(0)
    If (MM_delim = "none") Then MM_delim = ""
    MM_altVal = MM_typeArray(1)
    If (MM_altVal = "none") Then MM_altVal = ""
    MM_emptyVal = MM_typeArray(2)
    If (MM_emptyVal = "none") Then MM_emptyVal = ""
    If (MM_formVal = "") Then
      MM_formVal = MM_emptyVal
    Else
      If (MM_altVal <> "") Then
        MM_formVal = MM_altVal
      ElseIf (MM_delim = "'") Then  ' escape quotes
        MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
      Else
        MM_formVal = MM_delim + MM_formVal + MM_delim
      End If
    End If
    If (MM_i <> LBound(MM_fields)) Then
      MM_tableValues = MM_tableValues & ","
      MM_dbValues = MM_dbValues & ","
    End If
    MM_tableValues = MM_tableValues & MM_columns(MM_i)
    MM_dbValues = MM_dbValues & MM_formVal
  Next
  MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

  If (Not MM_abortEdit) Then
    ' execute the insert
    Set MM_editCmd = Server.CreateObject(")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_ = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

    If (MM_editRedirectUrl <> "") Then
      Response.Redirect(MM_editRedirectUrl)
    End If
  End If

End If
%>
2012-03-23 23:28
cqbsynlaw
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2016-6-24
得分:0 
我也是这样 老出现 MM_editCmd.Execute 一出现这个就完了哟,也求那位老师解决一下这个问题
2016-06-24 14:57



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




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

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