Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CursorToXML, XMLToCursor and XMLAdapter
Message
 
To
12/05/2006 07:20:08
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01121251
Message ID:
01121252
Views:
11
>I was using CursorToXML and XMLToCursor to pass some information back-and-forth between some scripts, but now I have a situation where I have multiple cursors to pass. Someone suggested using the CursorAdapter to do this, but I'm having some difficulty understanding it's usage. How is it different from the other ones? With those, I just give it my XML variable, or cursor, set some flags and I'm good to go. Anyone have an example of this in code?

Why not do something like:
LOCAL oPassedXML as COLLECTION
oPassedXML = CREATEOBJECT([Collection])
oPassedXML.Add(CURSORTOXML(....),[DesiredAlias1])
oPassedXML.Add(CURSORTOXML(....),[DesiredAlias2])
**etc. You could put code above in a loop if you want
SendAllXMLsToOtherRoutine(oPassedXML)


FUNCTION SendAllXMLsToOtherRoutine(oPassedXML)
  LOCAL lnFor, lcAlias
  FOR lnFor = 1 TO oPassedXML.Count
      lcAlias = oPassedXML.GetKey(m.lnFor)
      XMLtoCursor(oPassedXML[m.lnFor],lcAlias, .....)
  NEXT
RETURN
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform