This function exports an opened application into files. Generalizes the older Export_appl_ex function which cannot be used since version 9. Export properties are described in the epar structure:
item | meaning |
cbSize | size of the t_export_param structure in bytes |
hParent | parent window for possible dialogs (unused since version 9) |
with_data | export including table data (the meaning of further 6 parameter can be found in application export dialog description) |
with_role_privils | export including role privileges |
with_usergrp | export including user and usergroup privileges |
exp_locked | export encrypted |
back_end | export only back-end (unused since version 9) |
date_limit | specifies a date (if non-zero) and exports only objects modified after this dat; all application objects will be exported if zero |
file_name | full path to the output file (APL extension); also specified the folder for storing other files created during the export; if nil, the function will display the dialog for file selection |
long_names | if TRUE, then the file names will be derived from the object names, if FALSE, the file names will be truncated to the 8.3 format (unused since version 9) |
report_progress | if TRUE, callback will be called |
callback | procedure, that will be called for each exported object, or nil |
param | optional parameter that will be passed to the callback function |
schema_name | name of the exported application; if empty, the current name will be used |
overwrite | if zero and some of the exported files already exists, an error will occur; if nonzero, the file will be overwritten |
The report_progress item specifies, whether the export progress should be displayed. If callback = nil, then the export progress will be displayed in the standard 602SQL dialog. If the callback value is a pointer to a procedure of the following type:
procedure CallBack(Categ : Integer; Value : PChar; Param : Pointer ); stdcall; void CallBack( int Categ, char * Value, void * Param );
the application may inform about the export progress using its own resources. The Categ argument specifies the type of status information, the Value argument its value and the Param argument is a copy of the param item from the t_export_param structure. If the procedure is specified, it will be called each time a object is exported by the Export_appl_param function and in some other situations:
Categ | Value | Description |
IMPEXP_PROGMAX | object count | Called on the beginning of the export, the Value value is the count of all objects in the application (as Integer). Allows e.g. setting the Max property on ProgressBar |
CATEG_... | object category | Called for each object, returns the category and the name of exported object |
IMPEXP_FILENAME | see description | If called after calling IMPEXP_PROGMAX, Value is the name of the APL file. If called after calling the CATEG_..., Value is the name of the file with the exported object |
IMPEXP_PROGSTEP | N/A | Called after a object is exported. Allows e.g. moving the ProgressBar one step ahead (Value not available) |
IMPEXP_ERROR | error description | The error message about the cause of object export failure or the result of importing the whole application |
IMPEXP_STATUS | final information about the export success or failure | End of the import |
The t_export_param structure definition and the possible procedure from the callback parameter can be found in the definition files for the various programming languages.
TRUE if successful, FALSE otherwise.