Read a dataset from a stream

From: Todd A (zeus_at_olympus.com)
Date: 12/21/04


Date: Tue, 21 Dec 2004 15:51:13 -0600

Does anyone have a method up their sleeve to read a DataSet from a Stream?
I see that the DataSet.ReadXML(stream) is not supported in the .NET CF.

The dataset I am trying to read is on the PPC file system, but it is
encrypted.
I retreive the file, decrypt it, and now have the "text" of the xml in a
string/stream variable.

I would now like to read this string/stream variable into a new dataset.

I know I could rewrite the decrypted XML to the file system, and read it
from there, but I am trying to avoid leaving any hint of decrypted data on
the file system.

I've tried using an XMLReader, but can't seem to locate the correct method
and or sequence of events to get it into a dataset. I do get an error that
reads:

"This is an unexpected token. The expected toekn is 'NAME. Line 1, position
2."

The XML in the stream/string includes it's schema. The XML consists of
two(2) tables with one relationship between them. (parent key/foreign key)

I can use either a string or a stream for this task.

Thank you,

Todd Acheson



Relevant Pages

  • RE: Read a dataset from a stream
    ... You need to use DataSet.ReadXmloverload. ... Should you get an exception for valid XML, ... > Does anyone have a method up their sleeve to read a DataSet from a Stream? ... > I know I could rewrite the decrypted XML to the file system, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Data table text I/O package?
    ... regular and homogenuous data in mind. ... Given a data format much like in, ... I said XML is good for parsing of data if you cannot tell in advance that the data stream is totally free of errors. ... However, if some data item contains a separator due to an error, you loose the whole stream, or use the wrong data without noticing this, in the worst case. ...
    (comp.lang.ada)
  • RE: Unparsed Interchange
    ... but have you tried setting your stream position back ... from the received one (flat recieved -> xml out with some new parameters). ... // Get the original filename ... string filename = inmsg.Context.Read("ReceivedFileName", ...
    (microsoft.public.biztalk.general)
  • Error message when opening a recordset with a strem containing xml
    ... I have a problem when trying to open a recordset with a stream including xml ... System.String schemaText = null; ...
    (microsoft.public.data.ado)
  • Re: Processing Word documents
    ... where it can take an already opened stream. ... to Biztalk do that to convert to XML which BizTalk then reads, ... Second option is to develop a custom pipeline component that would ...
    (microsoft.public.biztalk.general)