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

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Cowboy (Gregory A. Beamer) - MVP (NoSpamMgbworld_at_comcast.netNoSpamM)
Date: 09/29/04


Date: Wed, 29 Sep 2004 08:05:03 -0700

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
> 


Relevant Pages

  • Re: Generating one table with a terabyte of data
    ... Run perfmon counters to a log and analyze them after a bulk load. ... > On fast bulk loads you should make sure that the database is not logging. ... >> I've locked SQL server to 1/3 physical memory usage. ...
    (microsoft.public.sqlserver.dts)
  • Re: Bulk Insert and sp_dboption
    ... TargetDatabase only takes more time and resources. ... data in the bulk copy statements (Select Into, bcp, Bulk Insert, Create ... Writetext and Updatetext) is not logged in the transaction log. ... PS If Bulk Insert causes blocking problems on your database, ...
    (microsoft.public.sqlserver.programming)
  • Re: Generating one table with a terabyte of data
    ... On fast bulk loads you should make sure that the database is not logging. ... If the bulk load is fast enough you can always reload ... > I've locked SQL server to 1/3 physical memory usage. ...
    (microsoft.public.sqlserver.dts)
  • Bulk-Logged Recovery question
    ... If I take a full backup of the database and then set the transaction log to ... I then bulk insert> 1 million rows into the product portfolio ... is the TRN file the normal size because it was ...
    (microsoft.public.sqlserver.setup)
  • Bulk-Logged Recovery question
    ... If I take a full backup of the database and then set the transaction log to ... I then bulk insert> 1 million rows into the product portfolio ... is the TRN file the normal size because it was ...
    (microsoft.public.sqlserver.server)