Bulk updating records/rows whilst STILL in DataSet?

M

Mike Kingscott

Hi there,

Just curious if you can issue a bulk update command on records in a
DataSet table, i.e. Update fields in a certain DataTable with criteria
that picks the Rows, and Delete Rows from a DataTable with criteria?

Currently, I'm looping around the Rows in the DataSet's DataTable and
updating/deleting from there - which seems awfully cack.

Also, I want this processing to remain in the DataSet - I know I could
update the database with the DataSet and then call the run the SQL
there, but I don't want to as I'm halfway through my processing at
that point.

Kind regards,

Mike Kingscott
 
G

Guest

SQL Server oriented answer:

You can determine the changed rows by looking at the different versions of
the rows in the DataSet (original, current, etc.). You can then call Update()
on the DataAdapter.

Note, however, that Update loops also. There are other options, however. For
example, you can set up the XML from the DataSet as a Diffgram/Updategram
type of setup and fire it at the database.

To bulk load, via BULK INSERT or the bulk XML insert, you will have to
create the facility outside of ADO.NET.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

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