Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorToXML support for multiple Cursors into a single X
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00507156
Message ID:
00549453
Views:
20
Steve,
XMLUpdategram does not give you a representation you can turn into another cursor. It gives you the information you need to create a SQL UPDATE statement to update the back-end data.

There are before before/ block and after after/ blocks for as many records as you changed in the buffered table. The before tags are used to create the WHERE clause. The after is used to create the SET. The same information can be used to create FOR clauses and values for a REPLACE command.

Note: Inserted records have blank before blocks while deleted records have blank after blocks. You need to take that into accoutn when parsing the XML string.

HTH.

>>You can have code to handle CursortoXML, XMLtoCursor and XMLUpdategram.
>
>Have you worked with XMLUpdateGram()? I am trying to use it to pass data between VFP servers, but it looks like the function doesn't make "cursorizable" XML that I can merge into the back-end. Is there more documentation somewhere on this?
>
>
>Clear
>Close Tables all
>
>USE c:\wintemp\zip IN 0 SHARED
>Select zip
>Set Multilocks on
>? CursorSetProp('buffering',5)
>? CursorSetProp("KeyFieldList","iid")
>
>CursorToXML("zip", "c:\wintemp\zip.xml", 1, 512, 0, "zip.xsd")
>
>Replace all state with "zz" for Recno() <= 15
>
>cOutGram = XMLUpdategram("zip",2+4+8+32)
>StrToFile(cOutGram,"c:\wintemp\zipgram.xml",0)
>
>
>? Chr(13) + Chr(10)
>? XMLToCursor("c:\wintemp\zipgram.xml","incursor",4)
>
>
>
>
>Thx.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform