RE: passing ArrayLists to database
From: Saurabh Nandu (SaurabhNandu_at_discussions.microsoft.com)
Date: 10/08/04
- Next message: Saurabh Nandu: "RE: What's the fastest way to transport a DataSet object?"
- Previous message: Saurabh Nandu: "RE: Shared Business Logic DLL"
- In reply to: Ken: "passing ArrayLists to database"
- Next in thread: Ken: "RE: passing ArrayLists to database"
- Reply: Ken: "RE: passing ArrayLists to database"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 8 Oct 2004 00:03:02 -0700
Ken,
I think what you should be looking at is using DataSets.
The advantages are as follows in your context.
1) DataSets have a Row State porperty that is automatically set to Modified
if data within any of the rows changes, So you can later extract only the
modified rows and send them to server.
2) Again since the DataSet exposes a RowState property, you can get only the
rows that have changed and send them to server for updating. So that you are
only locking relevant records.
3) In .NET v1.1 there is no default way to do bulk insert, i.e. send an
arraylist of parameters to stored procedures as far as I know. You will have
to convert it into a comma seperated list or something like that.
Although, there is a spereate Add-On called SqlXML from Microsoft that
supports BulkInsert. You should download that and then serialize your DataSet
into XML and update it via SQLXml
- Next message: Saurabh Nandu: "RE: What's the fastest way to transport a DataSet object?"
- Previous message: Saurabh Nandu: "RE: Shared Business Logic DLL"
- In reply to: Ken: "passing ArrayLists to database"
- Next in thread: Ken: "RE: passing ArrayLists to database"
- Reply: Ken: "RE: passing ArrayLists to database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|