Your application will access the sample officestore database. You must
create a meta-schema file based on this database, and you will set the DBPATH environment variable
to the directory containing the database file.
The file for a SQLite database named
officestore.db, is located in My Genero
Files/samples/OfficeStoreRes/database-sqlite/. From this database, you create a
.4dbx schema file. It contains the information about the tables, columns, and
relations of the relational database that is needed by your application. It will later be used to
create items in your Business Application Diagram (4ba)
-
Select .
The New Meta-schema dialog opens.
-
Complete the Meta-schema file step.
-
Click on the File Browser icon next to the Meta-schema file path
field.
The Save File As dialog opens.
-
Navigate to the My Genero Files/samples/OfficeStoreRes/database-sqlite/
directory. Enter "officestore" in the File name field. Select "Genero
Database Schema Files (*.4dbx)" in the Save as type combobox. Click
Save.
-
Ensure the Insert the file in the project check box is selected.
-
Select the Databases node.
-
Click Next>.
-
Complete the Connection information step.
-
Select "SQLite" as the Database type.
The Database driver defaults to "dbmsqt".
-
Click on the File Browser icon next to the Database file field.
The Save File As dialog opens.
-
Select the officestore.db file located in the My Genero
Files/samples/OfficeStoreRes/database-sqlite/ directory.
-
Click Test Connection to verify that the connection is successful.
-
Click Finish.
The dialog closes, and the officestore.4dbx file is created in the
-
Add the DBPATH environment variable to the DB-SQLite environment set.
The application needs to know where the database file sits at runtime. DBPATH is used to
specify the path to the file.
-
Select
The Genero Configuration Management dialog opens.
-
Under Environment Sets, select "DB-SQLite".
-
Click the green plus icon.
The Environment Variable dialog opens.
-
In the Type combobox, select "Directory List".
-
In the Name field, enter "DBPATH".
-
In the Value field, use the File Browser to locate the path My
Genero Files/samples/OfficeStoreRes/database-sqlite/.
-
Click OK.
The DBPATH environment variable is added to the DB-SQLite environment set.
-
Ensure the DB - SQLite environment set is selected (checked).
-
Click OK.
The Genero Configuration Management dialog closes.
-
Save the changes to your project.