vb.net - Can't delete the record in database/access from vb form -


I am trying to program a list, but my removed button is not working. Here is my Remove Button: btnremove.Click the handleboxBox.Show ("Do you handle personal sub btnremove_Click (ByVal as System.Object, ByVal E. System.EventArgs) To really remove this task? ", _" Remove ", MessageBoxButtons.YesNo, _ MessageBoxIcon.Warning) = DialogResult. Then exit the MsgBox (" Cancel Operation ") sub-term then slow CB New OleDb.OleDbCommandBuilder (DA) con.Open (as) Ds.Tables ("todolist") rows (ink) .elete () MaxRows = MaxRows - 1 ds.AcceptChanges () con.Close () Inc = 0 NavigateRecords () da.Update (DS, "todolist") End Sub

After the removal button is pressed, it will only remove from my user interface, but not in my database.

  private sub btnremove_Click (ByVal sender as System.Object, as ByVal E System.EventArgs) handles btnremove.Click MessageBox.Show ("Do you really want to remove this task?", _ "Remove", MessageBoxButtons.YesNo, _ MessageBoxIcon.Warning) = DialogResult.No again MsgBox ("Cancel operation") or else the slow CB New OleDb.OleDbCommandBuilder (DA) con.Open () ds.Tables ("todolist") rows (ink) .elete () MaxRows = MaxRows - 1 ds.AcceptChanges () con.Close () Inc = 0 NavigateRecords () da.Update (DS, "Todolist") End And End   

Note: The default button of the msgbox is not if you type NO This entry is used when the msgbox prompt press Yes then the code will be passed in the section, then only it will be DB < P> if the job does not return

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -