ImportToDatabase(FileName As String, Statuses As Integer, Queues As Long, Keep As Boolean, DeleteImportedItems As Boolean, DeleteFile As Boolean, ImportDefs As Boolean, NoOfImported ByRef As Integer, ImportedType ByRef As Integer, ID ByRef As String, ID2 ByRef As String, JobName ByRef As String) As Integer

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:

NoOfImported contains the actual number of exported items when the function is finished.

The method returns 0 if it succeeded, otherwise an error code.

Parameters

Parameter

Description

FileName

Export file name, including full path.

Statuses

Statuses to import. Set bit to:

2 for Identified
4 for Complete
8 for Incomplete
16 for Interpretation error
32 for Validation error
64 for Retype
128 for Transferred
256 for Unidentified
512 for Mass Verify

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.

The Application object