Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting ADO to XML string
Message
From
20/08/2001 18:33:57
 
 
To
19/08/2001 18:34:09
General information
Forum:
Internet
Category:
Javascript
Miscellaneous
Thread ID:
00545946
Message ID:
00546494
Views:
24
>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform