How do I specify a database for a form file?

The database to which the form file will refer and to which the fields of the form may be linked is specified in the Properties View.

Setting the database using this tab is equivalent to using the DATABASE statement at the beginning of the .per form file, but the Database tab offers some additional options. If the connection to a database is not required, you do not need to add the “formonly” database, as you would have to do in the text form editor. The “formonly” database is the default database which is used when no other database is specified in the Database tab. It is not displayed in the Database and Tables section.

To specify a database for the form file, do the following:

  1. Select the Database tab in the Properties view
  2. Press the Add… button (the green gross button).
  3. The add dialog will be opened, type the name of the database.
  4. If you want to add an alias for the database, select the “Use alias” option and enter the name of the alias.
  5. Press the OK button. The connection to the specified database will be tested.

If the connection fails, an error message with the information about the reason of the failure will be displayed.
If the connection is established, the database together with its tables will be displayed in the Properties View.
You need the database driver set properly for Lycia, the database client (depending on the database you want to use) installed and configured and the database must exist and be accessible in order to specify it in a form file. The connection to the database is tested immediately when it is specified and not during the compilation.