![]()
Files in the Data Access
Part
When you create a new Data Access part, the following files are added to the Data Access
target within the IDE:
These are all stored in the IDE's working directory.
The following example shows the contents of a Data Access config file for an executable target called "CarLot", with a Data Access session called "CarLot1", and a mapping called "Car". The working directory is F:\project.
target "F:\\project\\CarLot.exe"
{
source "F:\\project\\CarLot1.dax"
source "F:\\project\\CarDatastore.vbf"
source "F:\\project\\Car.vbf"
source "F:\\project\\CarDataId.vbf"
source "F:\\project\\CarManagerTemplate.vbf"
source "F:\\project\\CarManagerBase.vbf"
source "F:\\project\\CarManager.vbf"
source "F:\\project\\CarDataIdManagerTemplate.vbf"
source "F:\\project\\CarDataIdManagerBase.vbf"
source "F:\\project\\CarDataIdManager.vbf"
source "F:\\project\\CarForm.vbf"
}
Generated Code Files
If you generate code for the Data Access mapping, or if you build the parts into the
target, then the C++ classes that correspond to the new part will be generated. the file
names are based on the mapping name(s).
![]()
Data Access Builder generates files
that are FAT-, HPFS- and NTFS-compatible that contain the C++ classes for each mapping in
the part;
If you chose ESQL as the database access method, then a .sqx file is generated; otherwise, a .hpp and a .cpp file are generated. These files are also stored in the IDE's working directory (in the Data Access Builder working directory for AIX).
The generated files contain the implementation of the generated classes. Generated classes are named after the mapping. For example, if you map to an object called Employee, then all the generated class names will start with 'Employee'. Before you generate the classes, you can change the base name of the generated classes by opening the Properties notebook (select Properties from the mapping icon's popup menu) and typing in a new name.
For the above example, where the mapping is called Employee, the following names would be assigned to the generated classes:
Employee (the persistent object class)
EmployeeDatastore (the datastore connection class)
EmployeeDataId (the data ID class, generated if there is a set of columns that represents a data ID)
EmployeeManagerBase
EmployeeManagerTemplate
EmployeeManager (the class for managing Employee objects)
EmployeeDataIdManagerBase
EmployeeDataIdManagerTemplate
EmployeeDataIdManager (the class for managing EmployeeDataId objects, generated if there is a set of columns that represents a data ID)
Data Access/Visual Builder Tutorial
Creating a Visual Data Access Application -
Follow the instructions in this tutorial to create a basic data access application
visually, by using some of the parts described above.
![]()
Change Mapping Properties
Generate Source Code
![]()
Data Access Class Library and Generated Code
