Format of the database description file

When HBasic wants to connect to a database it must know which databases are available on the local PC server. Hbasic uses QT3 database features to establish a connection to an existing database. Therefore every connection needs 5 parameters. These are You may input this 5 parameters every time you want to connect to a database with the HBasic GUI. It is simpler if you may select the database you want to use from a list of predefined databases. You may therefore edit a file "/usr/local/hbasic/used_databases.info" for the db connections that you want to use from your computer.

This file holds one database description on each line. Each line holds the properties separated by the character '|'. In addition to the parameters listed above you may add a short description text for each database. A typical line in the database description looks like the following:

hbasic|Database to test HBasic program|localhost|user|password|QMYSQL3

This means each row has 6 fields in the following order:

  1. Name of the database
  2. Desciption of the database
  3. Hostname or IP of the database server
  4. User name for database login
  5. Password for database login
  6. QT Driver type for the database connection
Fields like user and password are optional. If you want to leave them blank the matching fields in the database connect dialog will be left blank and have to be filled by the user when starting the application. The driver type may be preselected in this file or selected from the list of compiled drivers. Each driver plugin that you have compiled for QT should be selectable in the combobox of the drivertype in the database selection dialog.