Re: MDAC Converting Dataset to XML



Stewart (Oraculum) wrote:
OK, I think I have reproduced your code in Delphi as follows:

if Recordset = nil then Exit;
try
RS := CreateOleObject('ADODB.Recordset');
RS := Recordset.Recordset;

xmlobj := CreateOleObject('MSXML2.DomDocument');

if Form2.RadioButton1.Checked then
RS.Save(xmlobj, pfXML)
else
RS.Save(xmlobj, pfADTG);
Result := xmlobj.xml;
finally
Stream.Free;
RS := UNASSIGNED;
end;

As you see didn't require too much change and the results are the
same, however trying this method via ADTG fails but I think I would
expect that seeing as its using an XML object explicitly.

I don't see the key part, which is opening the recordset on the xml file
created by the successful rs.Save.

In fact, I don't see where you open this recordset at all ...

The goal is to be able to reproduce the symptom without having access to
your database.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.