Καλησπέρα.
Θέλω να κάνω insert τα δεδομένα ενός DataGridView το οποίο το έχω γεμίσει με query σε MySQL, σε ένα αρχείο mdb της access. Μπορώ και αδειάζω τον πίνακα , αλλά όταν μπαίνει στη λούπα για το insert δεν κάνει τίποτα , ούτε πετάει κάποιο exception.
Ακολουθεί ο κώδικας της λούπας - δυστυχώς δεν μπόρεσα να κάνω το code snippet να δουλέψει
For Each dr As DataGridViewRow In dgExport.Rows
dim query2 as String = "INSERT INTO [Table] ([Table].column1, [Table].column2, [Table].column3 ) VALUES(dgExport.CurrentRow.Cells(0).Value & " , '0', " & dgExport.CurrentRow.Cells(2).Value & ")"
dbcommand.CommandText = query2
dataadapter.SelectCommand = dbcommand
Application.DoEvents()
Next