Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible ER for XMLToCursor
Message
De
16/08/2002 08:39:34
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00690093
Message ID:
00690303
Vues:
16
>I would like to get some feedback on this idea, to see if it is worthy as an ER for VFP8.
>
>With VFP7SP1, we can use XMLTOCURSOR to append a record to an existing table. What do people think about enhancing this to allow an existing record to be overwritten? For example:
>
>For an append from an XML string to a table the syntax is:
>XMLTOCURSOR(lcXMLString,"mytable",8192)
>
>Proposed syntax for a replace from an XML string into a table:
>XMLTOCURSOR(lcXMLString,"mytable",lnSomeFlag,lcPrimaryKeyField)
>Where:
>lnSomeFlag is an integer flag that can be added to the existing flags
>lcPrimaryKeyFeild is a string which indicates which field is the primary key in both the XML string and the table. For instance if I specified "ID", then XMLToCURSOR would look at the value of ID in the XML string, move to that ID in the table, then do a replace. If the XML string contained n records, n replaced would be done in the table.
>
>Reasons for request:
>To do this current I have to do the following steps
>1. Convert XML to cursor
>2. Scatter the cursor fields to variables (except the primary key)
>3. Move to the record in the table that should be overwritten
>4. Gather all the fields (except the primary key) into the record
>5. Do a tableupdate
>
>So adding this feature to XMLTOCURSOR would make our code simpler and would make working with XML data almost trivial. In a perfect would it would be cool to have INSERT, APPEND, SQL-SELECT be able to work with XML data directly, but I think the above would make life easier.
>
>Thoughts?

Hi Evan,

take a look at the XmlUpdateGram topic on the fox wiki; there's a routine there for actually using xmlupdategram in VFP, which sounds like what you want.

Hank
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform