Deleting record

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I am using a currency manager to manage my date entry. I use
MyCurrrencyManager.addnew() to add a new record. How do I delete the record?
I am using a dataadapter/dataset model. Would appreciate a code example.

Thanks

Regards
 
You can use the RemoveAt(Index) method...

Dim i As Integer
lstEmployees.Items.Remove(bmb.Position)
i = bmb.Position
bmb.RemoveAt(bmb.Position)
 
Do I need to update anything afterwards too? The record disappears from
screen but it is still there when I go back.

Thanks

Regards
 
You will need to fire the da.Update(dataset) command at some point to commit
the changes to the database. Firing the removeat only takes it out of the
local context. The update will delete it from the db.

HTH,

Bill
 
Back
Top