Re: Trouble recreating ADO recordset from XML



If your code runs in IE's process space, you should be aware of this KB
article:

http://support.microsoft.com/kb/240797

In a nutshell, ADODB.Stream got the "kill bit" in some security patch a few
years ago. A viable work-around object is MSXML.DOMDocument, which (like
ADODB.Stream) exposes an IStream, and works as both a destination for the
Save function, and a source for the Open function.


-Mark


<muybluie@xxxxxxxxxxx> wrote in message
news:1191259911.939764.4370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,

Sorry - hope this clarifies.

I use rst->Save to persist the data into a _Stream object. I then
send the stream over COM.

On the other side, I take the stream received, and use
_Stream::WriteText in order to take the buffer received over COM and
write it into the new stream.

Finally, I use Recordset::Open with the stream, an empty connection
(retrieved from the GetActiveConnection method of the recordset
pointer, which should be an empty connection), adOpenDynamic for
cursor type, adLockbatchOptimistic for the lock tyoe, and adCmdFile as
an option.

This works on most machines, but doesn't on a certain group.

The exception I get when trying to look in the recordset has no
description (the string seems to be empty), and the HRESULT is S_OK,
making debugging this all the more difficult.

Thanks,
Eyal



.



Relevant Pages

  • Re: Trouble recreating ADO recordset from XML
    ... I use rst->Save to persist the data into a _Stream object. ... Finally, I use Recordset::Open with the stream, an empty connection ... The exception I get when trying to look in the recordset has no ...
    (microsoft.public.data.ado)
  • 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: Easily copy a record to a table
    ... Just using Stream will not do this. ... You could use XML stream from the recordset to *switch* recordset from ... With ado I> want to use sql to query a single record from one table in a database,> and then with a few lines of code take that record and copy it to the> other identical table in the other .mdb file without using an INSERT> sql statement. ... > I just want to plop the record/recordset object field values into the> other table's fields very easily. ...
    (microsoft.public.data.ado)
  • Re: Recordset load XML
    ... file, if you are using a version of ADO that supports the Stream object, you ... new Recordset ... Recordset return so I save the RecordSet to an XML string: ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to clone recordset...
    ... You could load from the stream, but question is how you pass this stream to ... "Vladimir Korobov" wrote in message ... >> recordset and you could create it using Clone method of ADO recordset. ...
    (microsoft.public.data.ado)