The Data Module Wizard creates a data module, or specialized container for data access components. Once you define your DataSet components and their corresponding Column components in a data module, all frames that use the module have consistent access to the data sets and columns without requiring you to recreate them on every frame each time you need them. Data modules do not need to reside in the same directory or package as your project. They can be stored in a location for shared use among developers and applications. For more information on data modules, including a tutorial, see Separating database access logic and business rules from the user interface.
To open the Data Module Wizard, choose File|New to open the Object Gallery. Double-click the Data Module icon.
If a project is currently open, the Data Module Wizard displays. If no project is currently open, the Project Wizard steps you through creating a new project. Then, the Data Module Wizard is displayed.
The Data Module Wizard displays default values for the data module's package, class name, and file name.
For more information on packages, see the Packages topic in the "Creating and managing projects" chapter of Getting Started with JBuilder.
When you select OK, the wizard creates your custom data module. You can add Data Access components to the data module in the UI Designer. Adding Data Access components through the UI Designer also generates getter methods for these components.
You need to add the data module to the Frame class definition in your project (for example, DataModule1 dm1 = new DataModule();
) and compile the application to make the data module available to JBuilder.
For more information on data modules and a tutorial for creating a data module using sample InterBase files, see Separating database access logic and business rules
from the user interface in the Database Application Developer's Guide.