>>In IE 5.5 I have a XML data island.
>>I want to convert it to XML string.
>>However, the following program does'nt work since objADOStream is undefined.
>>How to convert ADO recordset to XML string in jscript ?
>>
>>
>>result.recordset.MoveFirst();
>>var objADOStream;
>>result.recordset.save( objADOStream, 1); //1=adPersistXML
>>document.frmdoc.RowData.value = objADOStream.ReadText(-1); //-1=adReadAll
>>
>
>Actually, if the reference to
result is the XML data island you can get to the XML source by accessing its XML property, as in
result.XML.
>
>And in your code, I think you would need to instantiate the ADO stream object first before trying to save the contents of the recordset to it. But that is unnecessary if you are trying to get to the XML source.
Thank you for the reply.
I tried it, but have found that if I have a date type in xml data island,
recordset save() method produces unspecified error message, for example using the data:
Also, If I add records to recordset, will the result.XML property contain also the changed rows ?
I tried to convert a xml string from .save() method to foxpro cursor using
Visual FoxPro XMLToCursor() function. However an error "invalid width on decimal places" during call XMLToCursor(). Is it possible to use this function?
Andrus