Language Reference Guide : System Classes : AppSource Class : ExportApp Method
 
Share this page          
ExportApp Method
The ExportApp method creates an export file version of the application.
This method has the following syntax:
integer = AppSource.ExportApp(filename = varchar(256)
          [, appsourceonly = integer]
          [, format = integer]
          [, metadata = integer])
This method exports the application definition and all its defined components, including any dynamically created frames or procedures, into the specified file. You can then load the file into another database with the ImportApp utility.
This statement has the following parameters:
filename
(Required) Specifies the name of the file to export to
appsourceonly
Specifies that only the application source information will be exported (application properties and included applications). No information about contained components will be included in the output. Selecting this option is useful when you want to recreate an empty application from an empty export file before importing its components.
To specify this parameter, the format parameter must be set to XF_XML.
format
Specifies the format of the export file. Valid format values are:
XF_EXP
Specifies the current export file format
XF_XML
Specifies the XML-based export file format (UTF-8-encoded). For more information, see the metadata parameter, following.
XF_DEFAULT
Specifies the export file format specified by environment variable II_W4GL_EXPORT_FORMAT. Valid values are EXP and XML. If II_W4GL_EXPORT_FORMAT is not set (or set to any other value), this is equal to XF_EXP. For more information, see the Workbench User Guide.
Default: XF_DEFAULT
Descriptions of system constant values and their numeric equivalents are listed in Export Format Settings for AppSource and CompSource.
metadata
Specifies that metadata attributes for applications or components should be included in the output. Metadata attributes are AlterDate, AlterBy, CreateDate, and Creator. Specifying this parameter is relevant only if format=XF_XML.
The method returns ER_OK if successful, or a non-zero value if there is an error. Descriptions of system constant values and their numeric equivalents are listed in Error Codes.
For more information about the ExportApp and ImportApp utilities and exporting to XML, see the Workbench User Guide.