To meet your needs, we constantly work to improve Querix products.
This means that Lycia documentation is developing as well.
In case you have found a certain dissonance between the provided information and the actual behavior of Lycia 3 and/or your applications, please, let us know about this via documentation@querix.com so that we can introduce the necessary changes to our documentation.
Thank you for your attention and cooperation.
With the introduction of the multi-database connection in Lycia 3 the default database driver for runtime and compilation takes effect only if there is no corresponding driver specification in the database configuration file for the used database name.
To set the database driver, start LyciaStudio and go to Window -> Preferences -> 4GL -> Database. From here, the developer can choose between a number of databases without the need to recompile after every change. This dialog window modifies the env.properties file which stores the environment variables used during Studio compilation. The LYCIA_DB_DRIVER variable acquires the following values depending on the option selected:
Oracle option = oracle
Informix option = informix
ODBC option = odbc
For the applications executed directly via the application server (i.e. for the applications run in GUI mode), the setting will be taken from the inet.env file associated with that particular listener.
To set the database driver you should open the inet.env file and modify the LYCIA_DB_DRIVER variable. This variable should have one of the following values:
oracle = Native connection to Oracle databases
informix = Native connection to Informix databases
odbc = General ODBC interface
To open the corresponding inet.env file follow the instructions below.
Step 1 |
Go to Window -> Preferences -> 4GL -> Run/Debug -> GUI Servers preferences page
|
Step 2 |
Select the GUI required server from the list
|
Step 3 |
Press the Edit Environment button
|
Step 4 |
inet.env will be opened in the editor area of LyciaStudio
|
Step 5 |
Edit the LYCIA_DB_DRIVER or add it, if it is absent:
LYCIA_DB_DRIVER=sserver
|
Step 6 |
Save the file and close it
|
If you compile and run your programs using the command line environment, you must set one of the following values to the LYCIA_DB_DRIVER environment variable to specify which database you want to connect to:
oracle = native connection to Oracle databases
informix = native connection to Informix databases
odbc = general ODBC interface
To set this variable on Windows you can edit the environ.bat file located in $LYCIA_DIR\bin directory. In this case the specified database driver will be loaded each time Lycia Command Line Environment tool is launched. You can also set the value for this variable using the Lycia Command Line Environment, however, it will not be saved and used for another instance of the Lycia Command Line Environment. Use the "set" command to set a variable:
set LYCIA_DB_DRIVER=db2
On UNIX/Linux you should run the following command within a terminal/shell session or window from the Querix directory:
. environ
["dot" "space" "environ"]
Here you can change the LYCIA_DB_DRIVER variable.
The database driver may also be set by appending the –DB flag to an application on the command line, this overrides the variables in the environment settings.