Update db with multiple dataset changes

S

steve

Datasets are great because you can manipulate the table data they
contain in a disconnected state, right? Then simply call the Update
method on the adapter that created the contained table to write
changes back. But the controls I use to effect these data
manipulations launch repeated postbacks. I'm saving the dataset in
ViewState and reloading on PostBack, but the original DataAdapter is
long gone by the time I'm ready to write the multiple changes back.
What am I missing here? Sure, I can get around this by immediately
writing each change back to the db and refilling the dataset on
postback, but that kind of kills the spirit of the disconnected
dataset.
 
M

Mary Chipman

Turn off automatic postbacks for all of those controls and create a
button called "Submit Changes" that does a signle postback and updates
the database.

--Mary
 

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