Delete selected row from DataGridView and MS-Access Database
问题 I am trying to delete the selected row from DataGridView and MS-Access database.. Private Sub ButtonEditDelete_Click(sender As Object, e As EventArgs) Handles ButtonEditDelete.Click If Not Connection.State = ConnectionState.Open Then Connection.Close() End If Try If Me.DataGridViewEdit.Rows.Count > 0 Then If Me.DataGridViewEdit.SelectedRows.Count > 0 Then Dim intStdID As Integer = Me.DataGridViewEdit.SelectedRows(0).Cells("Username").Value Connection.ConnectionString = "Provider=Microsoft.ACE