SET XMLFORMAT

From Lianjapedia
Revision as of 06:39, 10 December 2012 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

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

Syntax

SET XMLFORMAT TO < RECITAL | ADO | EXCEL >

See Also

COPY, 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 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")