Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CursorToXML, XMLToCursor and XMLAdapter
Message
 
À
12/05/2006 07:20:08
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01121251
Message ID:
01121252
Vues:
15
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform