Insert all data of a datagridview to database vb.net
问题 Dim Con As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Music_Sales_Database.mdb;") Dim Com As OleDbCommand Dim SaleCode As Integer Dim MusicID As String Dim SubTotalPrice As Decimal Dim Copies1 As Integer Dim STR1 As String SaleCode = 1 Com = New OleDbCommand Com.Connection = Con For x As Integer = 0 To SalesDataGridView.Rows.Count - 1 MusicID = SalesDataGridView.Rows(x).Cells(0).Value SubTotalPrice = SalesDataGridView.Rows(x).Cells(5).Value Copies1 =