Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    6

    Unanswered: Microsoft JET Database Engine (0x80040E14)

    hello..

    an error prompted when i submitted my form..

    this is the error :

    Microsoft JET Database Engine (0x80040E14)
    Syntax error in INSERT INTO statement.
    /kiosk/discount.asp, line 115

    and this is my sql 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("ADODB.Command")
    MM_editCmd.ActiveConnection = MM_editConnection
    MM_editCmd.CommandText = MM_editQuery
    MM_editCmd.Execute
    MM_editCmd.ActiveConnection.Close

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

    End If
    %>

    i can't find which line that i've done mistakes..thanks!

  2. #2
    Join Date
    Feb 2002
    Posts
    2,232
    response.write the following without executing the sql:
    MM_editQuery = "insert into "& MM_editTable & " ("& MM_tableValues & ") values ("& MM_dbValues & ")"

    This will show the actual insert statement being used and you will be able to see where the problem is. If not, post what is returned from the response.write.
    If you do not have SQL Server Books Online (BOL) installed - please do so. The majority of questions asked in the SQL Server forum could be eliminated if people had access to bol. BOL

  3. #3
    Join Date
    Dec 2003
    Posts
    454
    The string of MM_tableValues ends ",". So what is the function of MM_columns(MM_i)?

  4. #4
    Join Date
    Apr 2004
    Location
    London, beijing
    Posts
    2

    Talking did you deal with it?

    I think you used the dreamweaver to program. this article could be helpful.
    http://www.adopenstatic.com/faq/80040e14.asp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •