Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    272

    error '80040e14' Number of query values and destination fields are not the same

    Ciao a tutti,
    spero ci sia ancora qualcuno che possa darmi una mano!
    Allora il mio errore è il seguente:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access Driver] Number of query values and destination fields are not the same

    Verificando la stringa dell'ISERT sul web ho:

    INSERT INTO tbl_orders (order_ID, order_CustomerID, order_Tax, order_Shipping, order_Total, order_Status, order_ShipMeth_ID, order_Address1, order_Address2, order_City, order_Zip, order_Country, order_State, order_transactionID, order_Date, order_ShipName) VALUES ('110820URJXQKU1', '140758PMESMGPVK-07-11-92', 0, 17, 26,6, '1', 75, 'piazza Montessori 16', '', 'Crotone', '88900', 'IT', 'KR ', '326590450', #09/08/2005 11:13:20#,'Rossana Garena');

    Mentre il codice dell'INSERT è:

    query = "INSERT INTO tbl_orders " &_
    "(order_ID, order_CustomerID, order_Tax, " &_
    "order_Shipping, order_Total, order_Status, " &_
    "order_ShipMeth_ID, order_Address1, order_Address2, " &_
    "order_City, order_Zip, order_Country, " &_
    "order_State, order_transactionID, order_Date, order_ShipName) " &_
    "VALUES (" &_
    "'" & orderID & "', " & "'" & strCustomerID & "', " & intTaxAmount & ", " &_
    intShipTotal & ", " & intOrderTotal & ", " & "'" & OrderStatusID & "', " &_
    intShipPref & ", " & "'" & rs("cst_ShpAddress1") & "', " & "'" & rs("cst_ShpAddress2") & "', " &_
    "'" & rs("cst_ShpCity") & "', " & "'" & rs("cst_ShpZip") & "', " & "'" & rs("country_Code") & "', " &_
    "'" & rs("stprv_Code") & "', " & "'" & transactionID & "', " & cwMakeSQLDate(Now(),True) & ",'" & rs("cst_ShpName") & "');"

    Mi date una mano?
    Grazie

  2. #2
    è semplice...
    hai messo più campi del db che valori, o viceversa...

    es:

    insert into (nome, cognome)values('pippo')

    oppure

    insert into (nome, cognome)values('pippo','pluto','paperino')


    spero di averti fatto capire...
    Ah, Jedis! I had no ideas! What can i do for you, honored Jedis?

    I'm not Jedi. I'm a guy with a lighsaber and a few questions.

  3. #3
    controlla anche che dentro i campi numerici non vi siano virgole (vanno sostituite con il punto decimale) altrimenti il ragazzo mi va in confusione

  4. #4
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    272
    Già, ma il problema è che il modulo INSERT non l'ho creato io, è un pacchetto (un sito e-commerce) acquistato in America per cui non saprei dove mettere mano, visualizzando la stringa dell'INSERT sul web, ho notato che dopo l'indirizzo ci sono delle " e una virgola, forse è lì l'errore?

  5. #5
    no quello è un campo vuoto..
    non hai passato nessun valore...
    li ti doveva dire che i dati immessi non corrispondono...
    o che il campo non può essere vuoto...
    qui invece ti dice che tu hai 10 campi nel db ma ne iserisci 11 o viceversa...

    (spero di essermi spiegato)
    Ah, Jedis! I had no ideas! What can i do for you, honored Jedis?

    I'm not Jedi. I'm a guy with a lighsaber and a few questions.

  6. #6
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    272
    Ti ringrazio, sei stato chiaro, ma non riesco a risolvere il problema,
    dopo delle modifiche ora ho questo errore:

    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.


    E sul web:

    INSERT INTO tbl_orders (order_ID, order_CustomerID, order_Tax, order_Shipping, order_Total, order_Status, order_ShipMeth_ID, order_Address1, order_Address2, order_City, order_Zip, order_Country, order_State, order_transactionID, order_Date, order_ShipName) VALUES ('140832MKCPJDMT', '140758PMESMGPVK-07-11-92', , , , '1', 75, 'piazza Montessori 16', '', 'Crotone', '88900', 'IT', 'KR ', '326593081', #09/08/2005 14:15:32#,'Rossana Giglio');

    Ora il problema è su
    order_Tax, order_Shipping, order_Total


    Sto impazzendo, scusate, ma come notate non sono molto pratica!


  7. #7
    Utente di HTML.it
    Registrato dal
    Oct 2004
    Messaggi
    272
    Ho corretto, cmq grazie a tutti per la disponibilità.

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.