Dataset update problem

R

Rich

Hi

I have a Windows form that has a number of controls on that are bound to a
dataset. I'm using the code below to save the data back to the database:

connDB.Open()
da.Update(ds, "EQUIPMENT")
connDB.Close()

The problem I have is that if I update a record and move to the next record
then save it works fine, however if I update a record and then click the
save button it does not save the changes. Can anyone tell me how to update
the dataset to see the changes to a record and save them without me having
to move to the next record first.

Hope this makes sense?

Thanks
Rich
 
C

Cor Ligthert

Rich

probably when I understand you well

Give it a try?

Cor
connDB.Open()

DirectCast(BindingContext(ds.Tables(0)), CurrencyManager).EndCurrentEdit()
 

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

Top