Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


delete does not affect database!


delete does not affect database!

Author
Message
maia_18
maia_18
Forum God
Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)Forum God (455 reputation)

Group: Forum Members
Posts: 1, Visits: 15
Hi to all..

i have ha problem with my delete menustrip item...



when i click yes to the verification msgbox, the row i selected is deleted.

but when i click on another button , the row returns!!!

it does not seem to affect the underlying database..

i've seached google, but so far, i still haven't found an answer...

thanks in advance..



codecodecode:



Private Sub DeleteItemToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DeleteItemToolStripMenuItem.Click

dgvLadies.DataSource = vbNull

dsLadies = New DataSet()



daProducts.Fill(dsLadies, "products")

dgvLadies.DataSource = dsLadies.Tables(0)

dgvLadies.Visible = True



If MsgBox("Do you want to delete this row ?", MessageBoxButtons.YesNo) = DialogResult.Yes Then

dsLadies.Tables("products").Rows.RemoveAt(dgvLadies.CurrentRow.Index)

dgvLadies.Rows.RemoveAt(dgvLadies.CurrentRow.Index)

End If

daProducts.Update(dsLadies, "products")

End Sub
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search