ZOMDataLoad

Imports records into a table from a document.

Syntax

ZOMDataLoad <object specification> [<option>...]

Options

;k <keyword> [!]

The ;k option is used to assign a keyword to the selected object(s). If the keyword is already assigned, this assignment is ignored. If "!" is specified, the keyword assignment is removed for the object(s).

;p <property> [!]

Set the specified user-designated property for the selected object(s). If "!" is indicated, the specified property is reset for the selected object(s).

;d <document>

This is the name of the document (which must already exist) from which data is loaded. This document should have been previously specified as the ;d option in a ZOMDataSave command for the same object.

If you specify a specific document, it is recommended that you execute the data load against one object, since the document is defined to save data from a single specific object.

If you do not specify a document name, ZOMDataLoad uses the internal data save document name associated with each object.

;r <document>

This service generates a program that executes the data load function. This program is normally put in a temporary document. By specifying the name of the document to be used to store the program, ZOMDataLoad reroutes the program code to this document instead.

;q

This option causes ZOMDataLoad to skip actually loading the data. The programs to load data are created.

Comments

This program can be used to restore temporarily saved data into the object. The data usually comes from the internal ZOM document associated with each object that contains data. If, however, a ZOMDataSave was done where the data was saved into a named document, then that data can be loaded by specifying the document name with the ;d option.

The ;r option can be used to also generate a program that actually carries out the load operation. This program could be incorporated directly into your application where it may be necessary to load data into an object.

The data which ZOMDataLoad can retrieve must be created using ZOMDataSave.

Examples

The following command loads the contents of the EntitySet "Customers" from the datasave document associated with the Customers object.

ZOMDataLoad Customers

The following command loads the contents of the EntitySet "Customers" from the document "dsCusts." The program that executes the data load is generated into the document "pCustDataLoad."

ZOMDataLoad Customers ;d dsCusts ;r pCustDataLoad

As long as the definition of Customers does not change, subsequent data loads can be accomplished by executing the generated program, as shown below. This program can be compiled and embedded in your shipping applications.

pCustDataLoad()

The following command loads the data in all objects with the DataSave property set (i.e., EntitySets and relationships with fields). The data in these objects must have been previously saved using ZOMDataSave.

ZOMDataLoad +p ds