Scusate ma dove stà l'errore in questo codice:
codice:
sqlString = "INSERT INTO ordini, ordinidettaglio (" &_
"ordini_id, " &_
"ordini_utenteID, " &_
"ordini_ordineID, " &_
"ordini_prodottoID, " &_
"ordini_quantita, " &_
"ordini_prezzoprodotto, " &_
"ordinidettaglio_ordineID, " &_
"ordinidettaglio_spesespedizione, " &_
"ordinidettaglio_tipopagamento, " &_
"ordinidettaglio_dataconferma, " &_
"ordinidettaglio_stato " &_
") SELECT " &_
"carrello_id, " &_
"carrello_utenteID, " &_
" 100, " &_
"carrello_prodottoID, " &_
"carrello_quantita, " &_
"prodotti_prezzo, " &_
" 100, " &_
"" & replace(spesespedizione, ",", ".") & ", " &_
"'" & tipopagamento & "'," &_
"NOW(), " &_
"0 " &_
"FROM carrello, prodotti " &_
"WHERE carrello_utenteID =" & userID & " " &_
"AND carrello_prodottoID = prodotti_id "
Con.Execute sqlString
Mi esce tale errore:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[MySQL][ODBC 3.51 Driver][mysqld-4.0.18-nt]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ' ordinidettaglio (ordini_id, ordini_utenteID, ordini_ordineID,
Eppure mi sembra di aver fatto giusto, credo !