Add a meta-schema to the project (4dbx)

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)
  1. Select Database > Extract Schema....
    The New Meta-schema dialog opens.
  2. Complete the Meta-schema file step.
    1. Click on the File Browser icon next to the Meta-schema file path field.
      The Save File As dialog opens.
    2. 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.
    3. Ensure the Insert the file in the project check box is selected.
    4. Select the Databases node.
    5. Click Next>.
  3. Complete the Connection information step.
    1. Select "SQLite" as the Database type.
      The Database driver defaults to "dbmsqt".
    2. Click on the File Browser icon next to the Database file field.
      The Save File As dialog opens.
    3. Select the officestore.db file located in the My Genero Files/samples/OfficeStoreRes/database-sqlite/ directory.
    4. Click Test Connection to verify that the connection is successful.
    5. Click Finish.
      The dialog closes, and the officestore.4dbx file is created in the
  4. 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.
    1. Select Tools > Genero Configurations
      The Genero Configuration Management dialog opens.
    2. Under Environment Sets, select "DB-SQLite".
    3. Click the green plus icon.
      The Environment Variable dialog opens.
    4. In the Type combobox, select "Directory List".
    5. In the Name field, enter "DBPATH".
    6. In the Value field, use the File Browser to locate the path My Genero Files/samples/OfficeStoreRes/database-sqlite/.
    7. Click OK.
      The DBPATH environment variable is added to the DB-SQLite environment set.
    8. Ensure the DB - SQLite environment set is selected (checked).
    9. Click OK.
      The Genero Configuration Management dialog closes.
  5. Save the changes to your project.