Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorToXML
Message
From
27/10/2008 20:20:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01357537
Message ID:
01357558
Views:
35
That worked great! Is there a way for me to determine if the contents are actually valid XML? It's possible that during a transition period some of the memo fields will not have XML in them and I don't want to try and create a cursor from bad data.

>In order to correctly convert XML back to cursor, you've to include inline schema into generated XML
>
>
>CREATE CURSOR XmlStore (pk I, xml M NOCPTRANS)
>
>CREATE CURSOR Test (id  I, txt C(10), note M )
>INSERT INTO Test VALUES (1, "One", "First Line")
>INSERT INTO Test VALUES (2, "Two", "Second line")
>INSERT INTO Test VALUES (3, "Three", "Third line")
>
>lcXml = ""
>
>CURSORTOXML(0, "lcXml",1,8,0,"1")
>
>INSERT INTO XmlStore VALUES (1, lcXml)
>
>XMLTOCURSOR(XmlStore.xml , "crsXml")
>
>BROWSE LAST NOWAIT
>
>
>
>
>>I would like to store a cursor to a memo (general?) field in a format (XML?) so I can recreate the cursor later. How can I do this? I've looked at CursorToXML and XMLToCursor, but it doesn't seem to do what I want. Or I don't know how to use it for this.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform