Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need XML from a table
Message
 
To
28/08/2001 17:08:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00549739
Message ID:
00550461
Views:
19
Hmmmm.... it doesn't work right for me...

I sort of get the data from SQL Server - it'll have a blank line at the top and an extra ElementType column (which is presumably from the schema).

Here's what I'm doing to test (against SQL Server's Pubs database queried through IIS):
lcSQL = "SELECT au_lname,au_fname,phone FROM Authors " + ;
        " WHERE au_lname like 'D%' " + ;
        " FOR XML AUTO,ELEMENTS,XMLDATA"


oXML = CREATE("Microsoft.XMLHTTP")
oXML.Open('GET',"http://localhost/pubs?sql=" + ;
                URLEncode(lcSQL) + "&root=pubs",.F.)
? oXML.Send()

* ShowXML(oXML.ResponseText)

XMLTOCURSOR(oXML.ResponseText,"Test",0)

RETURN
+++ Rick ---


>>The problem here is that the schema a) is not used by any shipping software (it's the .Net beta 2 single datatable of a dataset schema) b) can't be made to fit any other data. This includes importing data from SQL Server generated by the XML extensions which don't work either.
>
>XMLToCursor works nicely with SQL Server XML, as far as I can tell. Given, I haven't tried every datatype, but what I am using so far works fine. It also works with XML generated by persisting an ADO recordset. What problems are you seeing?
>
>I had been using my own routine to go from ADO XML to a VFP cursor, and when Gene G told me that ADO support had been added to XMLToCursor I realized a _huge_ performance gain.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform