Re: dataset -> xml stream -> dataset

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Fred Hirschfeld (a_at_b.c)
Date: 03/24/05


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



Relevant Pages

  • Re: Question about design, defmacro, macrolet, and &environment
    ... "Expects to find the literal string on the stream." ... (defun send (string &optional stream) ... (declaim (inline make-adjustable-string)) ...
    (comp.lang.lisp)
  • Re: Strange problem when not in debugger
    ... private string huidigWeb; ... int buffLength = 2048; ... // Opens a file stream to read the file to be uploaded ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ReplacerStream
    ... string, do a replace on that string and create a stream again to be ... If those are problems, and you are looking just for a single string, it seems to me that you could just read the stream one character at a time, checking to see if it matches the current character in your search string. ...
    (microsoft.public.dotnet.framework)
  • Re: Strange problem when not in debugger
    ... private string huidigWeb; ... int buffLength = 2048; ... // Opens a file stream to read the file to be uploaded ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: HTTP Object and Retrieving HTML Programatically
    ... I had to hardcode some query string and form post values, ... chunks defined by the buffer size ... //create a stream reader grabbing text we get over HTTP ... while (workingbuffersize> 0) ...
    (microsoft.public.dotnet.framework.aspnet)