RE: passing ArrayLists to database
From: Ken (Ken_at_discussions.microsoft.com)
Date: 10/08/04
- Next message: Saurabh Nandu: "RE: passing ArrayLists to database"
- Previous message: Saurabh Nandu: "RE: What's the fastest way to transport a DataSet object?"
- In reply to: Saurabh Nandu: "RE: passing ArrayLists to database"
- Next in thread: Saurabh Nandu: "RE: passing ArrayLists to database"
- Reply: Saurabh Nandu: "RE: passing ArrayLists to database"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 8 Oct 2004 01:03:04 -0700
Thanks, That was truly helpful. Following your question I refreshed my memory
regarding dataset and indeed it seems like the perfect solution for me. But
since my application is already designed to work with classes I don't want to
send dataset to the client. I was thing of having all my classes to implement
an interface for serializing their arraylists as datasets. Then, after a
class instance returns from the client to the middle tier, I can generate a
dataset from the cached copy in the middle tier and from the returning
object. Using the two datasets I can then use the merge method and have the
chached dataset incorporate the changes.
Will that sort of thing work? Will the RowState property of the chached
dataset will be changed after the merge?
Thanks again,
Ken
"Saurabh Nandu" wrote:
> 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: passing ArrayLists to database"
- Previous message: Saurabh Nandu: "RE: What's the fastest way to transport a DataSet object?"
- In reply to: Saurabh Nandu: "RE: passing ArrayLists to database"
- Next in thread: Saurabh Nandu: "RE: passing ArrayLists to database"
- Reply: Saurabh Nandu: "RE: passing ArrayLists to database"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|