Updating Data in a DataView

T

Tim

Hi Guys,

I have a situation where I have a grid loaded with data. It is not data
bound. Clicking an image opens up another form that allows the change of
the data in the grid.

Right now the changed data (1 row) is written to the DB and the whole
grid is reloaded from the DB which now incorporates the change.

My question is can I update the data in a data view? That way I can
right the change to the DB and update the DataView without having to dip
the DB every time and essentially avoid reloading a 1000 rows of data
because I changed one.

How do I change one row in a DataView?

Thanks

Tim
 
G

Guest

You can use the GetChanges method to create a new DataSet that can be sent
into a DataAdapter to perform your update on only the changed rows. Since
you've already made the change to the original dataset, you don't need to
return everything back from the database. This of course doesn't take into
account concurrency issues, but it may be sufficient for your issue.

Peter
 

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