Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it L'avatar di ITANIUM
    Registrato dal
    Feb 2002
    Messaggi
    496

    problema con inserimento dati

    ho creato un modulo per inserimento dati ma quando premo invia mi da il seguente errore:


    Microsoft JET Database Engine error '80040e14'

    Syntax error in INSERT INTO statement.

    /registrazione2.asp, line 115


    che significa

  2. #2
    significa che nell'istruzione INSERT INTO c'è un errore di sintassi.

  3. #3
    Utente di HTML.it L'avatar di ITANIUM
    Registrato dal
    Feb 2002
    Messaggi
    496
    il problema e che prima funzionava, poi di colpo non ha funzionato + ed io non ho modificato nulla

  4. #4
    Utente di HTML.it L'avatar di ITANIUM
    Registrato dal
    Feb 2002
    Messaggi
    496
    questa è la parte di codice interessata dove è l'errore:

    codice:
    ' *** 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("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
    %>

  5. #5
    fatti stampare MM_EditQuery prima di eseguirla, che la si controlla

  6. #6
    Utente di HTML.it
    Registrato dal
    Jun 2001
    Messaggi
    209

    ciao come faccio a farla stampare

    ciao ho lo stesso identico problema...
    e volevo sapere come
    stampare MM_EditQuery prima di eseguirla, per controllarla...
    il comando ma messo prima della riga insert

  7. #7
    MM_Dreamweaver MM_non MM_lo MM_fa MM_di MM_stampare MM_la MM_query MM_?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.