Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recordset to Cursor
Message
From
22/02/2006 16:14:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01098156
Message ID:
01098259
Views:
13
>
>xDOM = NEWOBJECT('MSXML.DOMDocument')
>oRS.Save(xdom, 1)
>XMLTOCURSOR(xdom.xml, "MyCursorName", 1028)
>
>>PS: Wouldn't work with all type of ADO recordsets - they don't work by any means anyway.
>>Cetin
>
>OK Cetin, this works. The only problem it has is with unsafe characters (such as if the data holds URLs and such). That's what was throwing the error and causing the XML not to be created properly. I wish there was an easy way to escape the unsafe characters using the DOMDocument object, but I guess I can't have it all. Thank you for this, and if you'll be kind enough to reply to this post, I'd like to mark your reply as the solution since I guess I can't change the earlier help star I gave you to a solution.

Craig,
Since you have data to test with, try with another flag excluding 1024 (say 0 or 4 only). Also you can try an alternative:

oRS.Save("mytemp.xml",1)
xmltocursor("myTemp.xml",'myCursor',512)

PS: I never mind about stars:) Keep as is so a better solution might come.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform