Try MysqlConn.Open() For i As Integer = Me.DataGridView1.SelectedRows.Count - 1 To 0 Step -1 Dim Query2 As String Query2 = "Update blist SET quantity=(quantity-1) where quantity = '" & Me.DataGridView1.SelectedRows(i).Cells(0).Value.ToString & "' " COMMAND = New MySqlCommand(Query2, MysqlConn) SDA.SelectCommand = COMMAND SDA.Fill(dbDataSet) bSource.DataSource = dbDataSet **error**Me.DataGridView1.DataSource = bSource**error** SDA.Update(dbDataSet) TextBox2.Text = "" MessageBox.Show("Success", "Informed", MessageBoxButtons.OK, MessageBoxIcon.Information) Next MysqlConn.Close() Catch ex As MySqlException MessageBox.Show(ex.Message) Finally MysqlConn.Dispose() End Try End Sub
i Canβt find the problem related to this on the Internet, what should I do? I am trying to subtract 1 quantity on SqlDB when the user borrowed it. Yes! it executes sql command, but im has this type of error.
bsource = SDA binding source = MysqlAdapter
source share