An empty container in which to store data objects.

Syntax

[<oRef> =] new DataModule( )

<oRef>

A variable or property in which to store a reference to the newly created DataModule object.

Properties

The following table lists the properties of the DataModule class. (No events or methods are associated with this class.)

Property

Default

Description

baseClassName

DATAMODULE

Identifies the object as an instance of the DataModule class

className

(DATAMODULE)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

name

Empty string

The name of a custom object

parent

null

Container, form or report

rowset

 

The primary rowset of the data module

Description

Use data modules to maintain multiple data objects and the relationships between them. Data modules bear some similarity to forms, except that they contain data objects only. Array, Session, Database, Query, and StoredProc objects are contained inside a DataModule object. They are represented by source code in files with a .DMD extension. You can create custom data modules (in .CDM files) and subclass them.

The relationships between the objects—in particular any masterSource, masterRowset, or masterFields properties—in addition to other properties and event handlers can be set for all the objects in the data module. A primary rowset is assigned in the data module’s rowset property, just like in a form. The DataModule object is intended to be a simple container. Other than rowset, the only other properties associated with this object are baseClassName, className, name and parent.