Application object
This method is used with ExportFromDatabase and StatusOnExportFile. We recommend that these three methods be implemented by advanced users only.
ImportToDatabase imports forms or sets from an export file (created by ExportFromDatabase) to the database. The forms or sets that match the parameters are imported, together with the following:
The form definition (or form definition(s) and set definition, if the file contains sets) if ImportDefs is set to TRUE.
Any associated image files (placed in the default directory for image files).
The job file (if specified).
NoOfImported contains the actual number of exported items when the function is finished.
The method returns 0 if it succeeded, otherwise an error code.
|
Parameter |
Description |
|
FileName |
Export file name, including full path. |
|
Statuses |
Statuses to import. Set bit to: 2 for Identified Add up if more than one status is to be imported. |
|
Queues |
Queues to import from. Bit flag. Set to -1 for all queues. |
|
Keep |
Used in case of "collision". If an object already exists in the database, this specifies how to handle the situation. If set to TRUE, the object in the database is kept and the import is ignored. If set to FALSE, the existing object is overwritten. |
|
DeleteImportedItems |
If set to TRUE, all items successfully imported are deleted from the file. If FALSE, all items are kept. |
|
DeleteFile |
If set to TRUE, the file is deleted when the import is finished, but only if all items are successfully imported. |
|
ImportDefs |
If set to TRUE, the form definition (or form definition(s) and set definition, if the file contains sets) is imported from the file. |
|
NoOfImported |
Returns number of successfully imported forms or sets. |
|
ImportedType |
1 = Forms, 2 = Sets. |
|
ID |
An optional user-specified string to be read from the file. Max. 128 characters. Not stored in FORMS. |
|
ID2 |
A second optional user-specified string to be read from the file. Max. 128 characters. Not stored in FORMS. |
|
JobName |
A job description file name, without any path. Job descriptions are imported to the Jobs folder. Both the job description file and the associated .evm file are written there. |