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

RE: Bulk updating records/rows whilst STILL in DataSet? by NoSpamMgbworld

NoSpamMgbworld
Wed Sep 29 10:05:03 CDT 2004

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!
***************************

"Mike Kingscott" wrote:

> 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
>