Difference between revisions of "SET XMLFORMAT"
From Lianjapedia
(8 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Specify the default format for XML files created by SELECT...SAVE AS XML | Specify the default format for XML files created by SELECT...SAVE AS XML | ||
− | |||
==Syntax== | ==Syntax== | ||
− | SET XMLFORMAT TO <RECITAL | ADO> | + | SET XMLFORMAT TO < RECITAL | ADO | EXCEL > |
==See Also== | ==See Also== | ||
− | [[SQL SELECT|SELECT]], [[XML]] | + | [[COPY]], [[SQL SELECT|SELECT]], [[XML]] |
− | + | ||
==Description== | ==Description== | ||
− | The SET XMLFORMAT TO <RECITAL | ADO> command allows you to specify the default format for XML files created by SELECT...SAVE AS XML. The XMLFORMAT can be | + | The SET XMLFORMAT TO < RECITAL | ADO | EXCEL > command allows you to specify the default format for XML files created by SELECT...SAVE AS XML and COPY TO...TYPE XML. The XMLFORMAT can be RECITAL, ADO (Microsoft® ActiveX® Data Objects) or EXCEL (Microsoft® Excel). Any XML files created in the ADO format can be loaded with the Open method of an ADO Recordset object. |
The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can also be overridden using the FORMAT clause on the SELECT statement. | The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can also be overridden using the FORMAT clause on the SELECT statement. | ||
− | |||
==Example== | ==Example== | ||
Line 24: | Line 21: | ||
// In Visual Basic the file can then be loaded like this: | // In Visual Basic the file can then be loaded like this: | ||
// Set adoPrimaryRS = New Recordset | // Set adoPrimaryRS = New Recordset | ||
− | // adoPrimaryRS.Open "example.xml" | + | // adoPrimaryRS.Open "example.xml" |
+ | // Excel example | ||
+ | set xmlformat to excel | ||
+ | open database southwind | ||
+ | use customers | ||
+ | copy to mycustomers.xml type xml | ||
+ | Lianja.showDocument("mycustomers.xml") | ||
+ | </code> | ||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] | ||
[[Category:Set_Commands|XMLFORMAT]] | [[Category:Set_Commands|XMLFORMAT]] | ||
[[Category:SQL]] | [[Category:SQL]] | ||
− | |||
[[Category:XML]] | [[Category:XML]] | ||
− | [[Category: | + | [[Category:Data Import]] |
+ | [[Category:Data Export]] | ||
+ | [[Category:Lianja VFP Extensions]] | ||
+ | [[Category:VFP Command Extensions]] |
Latest revision as of 06:39, 10 December 2012
Contents
Purpose
Specify the default format for XML files created by SELECT...SAVE AS XML
Syntax
SET XMLFORMAT TO < RECITAL | ADO | EXCEL >
See Also
Description
The SET XMLFORMAT TO < RECITAL | ADO | EXCEL > command allows you to specify the default format for XML files created by SELECT...SAVE AS XML and COPY TO...TYPE XML. The XMLFORMAT can be RECITAL, ADO (Microsoft® ActiveX® Data Objects) or EXCEL (Microsoft® Excel). Any XML files created in the ADO format can be loaded with the Open method of an ADO Recordset object.
The default XMLFORMAT setting is ADO. The default XMLFORMAT setting can also be overridden using the FORMAT clause on the SELECT statement.
Example
set xmlformat to ADO SELECT * FROM example; SAVE AS XML example // In Visual Basic the file can then be loaded like this: // Set adoPrimaryRS = New Recordset // adoPrimaryRS.Open "example.xml" // Excel example set xmlformat to excel open database southwind use customers copy to mycustomers.xml type xml Lianja.showDocument("mycustomers.xml")