Icon Using the Database Manager

The database manager provides a quick and easy-to-use interface to the databases and datasets defined in the IDE. The databases and datasets that are defined in the database manager are only available to the internal web server embedded in the IDE, and are a way of automating the usage of databases and datasets across multiple projects. The outer nodes in the database manager represent the defined databases, with all datasets within a given database defined as child nodes of each database node.

Image

By default, the database manager is visible in the IDE. If the database manager is closed, you can open it by using the Database Manager option on the View menu:

Image

Using Databases and DataSets in Projects
A database defined in the database manager can be used to create a database in a project by dragging the database from the database manager and dropping it into the project manager for the currently-opened project. When the database is dropped on or within the Units node of the project manager, a new TDatabase (or descendant) instance will be created for the project, along with an associated unit, and all of the defined datasets for the database will automatically be created as TDataSet instances in the new database instance.

A dataset defined in the database manager can be used to create a new dataset in the project by dragging the dataset from the database manager and dropping it on an open form or database designer in the currently-opened project. When the dataset is dropped on the form or database designer, a TDataSet instance will be created as a component of the form or database and all of the columns in the dataset will automatically be created in the new TDataSet instance.

Adding a New Database
Use the following steps to add a new database using the database manager:
  • Click on the Add Database button in the database manager toolbar:

    Image


  • The database editor dialog will appear. Please refer to the next section for information on defining the database.
Defining a Database
The database editor dialog consists of 2 pages:
  • General - the database engine/server type, the name of the database, and the description.

    Image

    Currently, the following database engines are supported:

    ElevateDB
    DBISAM
    ADO (includes OLEDB/ODBC)


  • Connection Properties - the name/location of the database and other configuration properties essential to establishing a proper connection to the desired database. The options on this page are specific to the database engine selected on the first page.

    Image

    Once the connection properties are set, you can use the Test Connection button to verify that everything is set properly. Please see your database engine manual/documentation for more information on the proper value for each property setting.


  • Once you have properly set the connection properties and successfully tested the connection to the database, click on the OK button to close the database dialog and save the database.
Editing an Existing Database
To edit an existing database using the database manager, simply double-click on the desired database in the list of databases in the database manager. The database editor dialog will then appear, and you can use it to modify the database accordingly.

Removing a Database
Use the following steps to remove a database using the database manager:
  • Click on the name of the database that you wish to remove:

    Image


  • Click on the Remove Database button in the database manager toolbar:

    Image


  • A confirmation dialog will be displayed, asking you to confirm the removal of the database. Click on the Yes button to continue, or the No button to cancel the removal.
Adding a New DataSet
Use the following steps to add a new dataset using the database manager:
  • Be sure that you have selected an existing database in the database manager by clicking on the desired existing database:

    Image


  • Click on the Add DataSet button in the database manager toolbar:

    Image


  • The dataset editor dialog will appear. Please refer to the next section for information on defining the dataset.
Defining a DataSet
The dataset editor dialog consists of 3 pages:
  • General - the name of the dataset and the description.

    Image


  • Row Source - the actual source of the dataset rows can be an actual table name from the selected database, or it can be an SQL SELECT statement.

    Image

    Elevate Web Builder uses a special parameter naming syntax for queries, and does not use the native parameter functionality in the target database engine. This is done because some database engines do not support named parameters, or do not support parameter type discovery or enumeration. When the dataset rows are requested from the internal web server embedded in the IDE, it automatically populates the named parameters in the query by using the URL "name=value" parameters passed with the dataset rows request. These parameters can be specified in the application via the TDataSet Params property.


  • Preview - use the preview page to make sure that the dataset is returning the correct rows. Any default values for parameters defined on the Row Source page are applied for the preview, so if you have not defined any default parameter values you may see zero rows displayed.

    Image
Editing an Existing DataSet
To edit an existing dataset using the database manager, simply double-click on the desired dataset in the list of datasets in the database manager. The dataset editor dialog will then appear, and you can use it to modify the dataset accordingly.

Removing a DataSet
Use the following steps to remove a dataset using the database manager:
  • Click on the name of the dataset that you wish to remove:

    Image


  • Click on the Remove DataSet button in the database manager toolbar:

    Image


  • A confirmation dialog will be displayed, asking you to confirm the removal of the dataset. Click on the Yes button to continue, or the No button to cancel the removal.
Image