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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top