PC Review


Reply
Thread Tools Rate Thread

Bulk updating records/rows whilst STILL in DataSet?

 
 
Mike Kingscott
Guest
Posts: n/a
 
      29th Sep 2004
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
Guest
Posts: n/a
 
      29th Sep 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
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Speed up Bulk Insert Dataset records! Jay Balapa Microsoft Dot NET Compact Framework 1 28th Jun 2006 10:41 PM
Speed up Bulk Insert Dataset records! Jay Balapa Microsoft ADO .NET 1 28th Jun 2006 10:41 PM
Updating a Dataset with one row vs. multiple rows issue Sam Carleton Microsoft ADO .NET 3 11th Oct 2005 04:14 PM
Updating many rows in dataset Scott Tenorman Microsoft C# .NET 1 14th Nov 2003 08:38 AM
Updating a dataset with deleted rows Puspak Barua Microsoft ADO .NET 0 14th Aug 2003 11:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:24 PM.