Re: Manipulating DataSets through XML

From: Val (val666_at_gmail.com)
Date: 09/13/04


Date: Mon, 13 Sep 2004 01:39:23 +0100

Thanks Shock,
I thought it would be better to have a dataset with all the records from the
db in memory, and manipulate the records inside the dataset. Then have a
thread that synchronizes the dataset with db every once in a while.

This server will be accessed by multiple users at once, and if all of them
delete records - the server will have to clear the dataset and refill it
from db every time a record is deleted. If the table contains alot of
records this might be pretty laggy.

This whole thing is in C# btw.
I don't know maybe im just being strange here, ne way I hope someone out
there can clarify this whole thing.

Thanks again,
Val

"Shock" <no@way.com> wrote in message
news:10k9nq95bblula9@corp.supernews.com...
> Val wrote:
>
>> Hi all,
>> Im trying to make a lil database server, it communicates with clients
>> through tcp connections.
>> Its pretty cool so far, but manipulating with the DataSet is messy:
>> There is a function which loads xml data (and schema) into the dataset
>> but whats the way to delete records from a dataset using xml?
>>
>> So far my solution came to this:
>>
>> DataSet "A" - Contains the original records
>> DataSet "B" - Contains same records as "A" but some have deleted
>>
>> 1.Create a new dataset "C" which contains deleted records using
>> "B.GetChanges(DataRowState.Deleted)"
>> 2.Convert "C" into xml string and send it to the server
>>
>> But ones "C" gets to server how do I delete the records in "A" using it?
>> I could use "foreach" on all the records in "A" and delete them if they
>> match records in "C", but surely theres a better way...
>>
>> Thank u!
>> Val
>
> Why not create a collection of objects (i.e. a collection of records to be
> deleted) and pass that collection to the server? Then you could have the
> server create an new instance of each record using an identifer from each
> object (i.e. record). Then simply remove each object (i.e. record) from
> the database. This would be easily implemented using a persistence
> framework such as Gentle.Net
> (http://www.mertner.com/confluence/homepage.action).
>
> This is pretty much the same basic idea, only it is much more OO than just
> using ADO/ADO.NET, easier to implement IMHO, and it would possibly be much
> faster.
>
> Shock



Relevant Pages

  • Re: Manipulating DataSets through XML
    ... > Im trying to make a lil database server, ... > Its pretty cool so far, but manipulating with the DataSet is messy: ... > There is a function which loads xml data into the dataset but ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Cannot create Word application object using remoting
    ... word document on the server and manipulate it? ... server though this shoudl work. ... > Dim app As Word.Application ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Distributing OWC11
    ... installation of the component on the server ... > fully satisifies licensing requirement. ... > or manipulated since it runs on the client. ... capture the image and manipulate the image as i see fit. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: Cannot create Word application object using remoting
    ... I am trying to open a document on the server in order to manipulate it to ... It looks like the problem is caused by all remoting calls being sent to ... by using a Windows app instead of a console app as the remoting server so ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: Header manipulation...?
    ... >As e-mail moves from server to server (and sometimes, ... Since this information is added by your mail server, ... >is unlikely that there's any type of header manipulation going on, ... >but that top one is difficult to manipulate unless they've hacked the ...
    (comp.security.firewalls)