ODBC Client

 

ODBC Administrator tool on Windows platforms can be used to establish connections to other database management systems that use SQL. In Windows 7 it is located in Control Panel\All Control Panel Items\Administrative Tools\ Data Sources (ODBC).

Individual connection profiles can be set up using the tabs in the ODBC Data Source Administrator window:

 

 

Press the Add… button and then enter the name of the data source and select the server, i.e. SQL Server. In the new dialog enter the DSN name and select the server to connect to:

 

 

The name of the data source entered in this dialog (e.g. qx_odbc) must be the same as the name of the database you want to connect to.

 

 

 

After that, follow the steps of the dialog for new data source creation.

You may want to set the ODBC_DSN variable. If this variable not set, the 4GL considers that the DATABASE statement specifies the DSN name. If you set this variable, the 4GL treats the value of the ODBC_DSN variable as the DSN name and the DATABASE in such case points to a catalogue in the database to which the 4GL should switch when connected. For the graphical clients set the ODBC_DSN variable in the inet.env file. To open inet.env file in LyciaStudio, go to Window-> Preferences -> 4GL -> Run/Debug -> GUI Servers, select the GUI server from the list and press the Edit Environment button. The file will be opened in the editor area of the Studio.

You must also set the default database driver to "odbc". If you connect to an SQL Server using the ODBC connection, you should set the database driver to "sserver", otherwise the functionality can be restricted and in some cases the connection might fail.

For detailed information concerning the connection to the databases, please see the appropriate documentation for your database type and the corresponding Querix migrate guide, which are available for download from our web-site.