RE: passing ArrayLists to database

From: Ken (Ken_at_discussions.microsoft.com)
Date: 10/08/04


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



Relevant Pages

  • RE: passing ArrayLists to database
    ... if data within any of the rows changes, So you can later extract only the ... modified rows and send them to server. ... rows that have changed and send them to server for updating. ... into XML and update it via SQLXml ...
    (microsoft.public.dotnet.distributed_apps)
  • [NT] Unchecked Buffer in SQLXML Could Lead to Code Execution
    ... SQLXML enables the transfer of XML data to and from SQL Server 2000. ... * A vulnerability in a function specifying an XML tag that could allow an ... attacker to run script on the user's computer with higher privilege. ...
    (Securiteam)
  • Re: BI Portal 2.1.7: View tree empty
    ... for SQLXML do not work, ... Another issue I start to see is that the BIP seems to be quite demanding to ... seem to want direct connection to the AS server, ... managers. ...
    (microsoft.public.sqlserver.olap)
  • Re: Difference between IIS 5 and IIS6
    ... pages that relate to SQLXML into one app pool and set a fairly agressive ... don't have a Windows 2003 Server with debug symbols running... ... so IIS does not interact with SQLXML at all. ...
    (microsoft.public.inetserver.iis)