Re: dataset -> xml stream -> dataset
From: Fred Hirschfeld (a_at_b.c)
Date: 03/24/05
- Next message: Fred Hirschfeld: "Re: Singleton Objects Dying"
- Previous message: Fred Hirschfeld: "Re: Loading assembly from GAC on remoting Client machine"
- In reply to: Marc Schumacher via DotNetMonster.com: "dataset -> xml stream -> dataset"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 24 Mar 2005 06:27:06 -0800
Well, I don't know how you are managing your TCP communications but you
should be able to:
- use WriteXml to get the dataset to a string
- transfer the data via the Stream (like you are doing (I assume by the
SyncLock that you can have multiple threads using the same socket?)
- use DataSet.ReadXml to load the XML back into a dataset on the other
side.
Now since you are in the Remoting group with this question, you should not
need to deal with streams. Can't you simply return a dataset from your
method (or at least a string)?
Fred
"Marc Schumacher via DotNetMonster.com" <forum@DotNetMonster.com> wrote in
message news:59e5a43789464df4aefaadc61e84d76a@DotNetMonster.com...
> Hi,
>
> I have a server program running on computer A which ought to transfer a
> dataset over tcp to a different computer B. At B, I want to fill a dataset
> with this xml stream again. I?ve been searching through google for a week
> but there is nothing appropriate. Does anyone know where to look or how to
> do it?
>
> is this somehow close?:
>
> Dim writer As Xml.XmlWriter = New Xml.XmlTextWriter(test)
>
> Dim test As Stream
> GlobalDataset.WriteXml(t)
>
> SyncLock mobjClient.GetStream
> Dim w As New IO.StreamWriter(mobjClient.GetStream)
> w.Write(test)
> w.Flush()
> End SyncLock
>
>
>
> Thanks for the help :-)
>
> --
> Message posted via http://www.dotnetmonster.com
- Next message: Fred Hirschfeld: "Re: Singleton Objects Dying"
- Previous message: Fred Hirschfeld: "Re: Loading assembly from GAC on remoting Client machine"
- In reply to: Marc Schumacher via DotNetMonster.com: "dataset -> xml stream -> dataset"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|