Difference between revisions of "SET XMLFORMAT"

From Lianjapedia
Jump to: navigation, search
Line 21: 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"</code>
+
// 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]]

Revision as of 07:41, 14 November 2012

Purpose

Specify the default format for XML files created by SELECT...SAVE AS XML

Syntax

SET XMLFORMAT TO < RECITAL | ADO | EXCEL >

See Also

SELECT, XML

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. 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")