4.7.2.  Database connection

In category Database connection, define access on database (e.g. MSSQL, Oracle, etc.).

[Note]Note

In V12.6 the configuration concept has been changed. A dbproxy.cfg does not exist anymore. Now the configuration takes place in odbc.cfg or jdbc.cfg. That means, the database connection has to be modified and the login will fail initially without adaption.

Preconditions:

  • ODBC driver: The functionality for the use of ODBC is automatically given.

    If the database is driven via AppServer, then the ODBC driver has only to be installed on the server. Only if the database is directly connected, it is also needed on the clients.

    In the dialog area Available database connections, in the list field Template, select "MSSQL via ODBC".

  • JDBC driver:

    All drivers installed under libs/all/java/jar are listed in the dialog area Available database connections, in the list field Template (the mentioned are delivered and are always available).

    Others have to be downloaded at the respective database supplier (Oracle, Microsoft) and copied in the directory libs/all/java/jar. They are NOT installed by CADENAS.

    Please download them under one of the following addresses.

    Afterwards they can also be selected under Template.

Create database connection:

Via New button, create the needed database connection and on the right, fill respective fields. Then under Active database connection, select the desired one.

You can also enter a variable under Active database connection. For example, enter "$DATABASETYPE" and create this variable e.g. in the start.env.

[ENVIRONS]
CADENAS=%DirOfThisFile%
CADENAS_SETUP=C:\ProgramData\PARTsolutions\setup
CADENAS_DEFAULTUSER=$CADENAS_SETUP\user\default_user
CADENAS_SITESETUP=C:\ProgramData\PARTsolutions\sitesetup
CADENAS_USER=%UserAppData%\PARTsolutions\user
CADENAS_LICENSE=$CADENAS_SITESETUP\lic
CADENAS_POOL=C:\ProgramData\PARTsolutions\pool
CADENAS_DATA=C:\data\
DATABASETYPE=group1

Now create connection via New, where the value refers to the value of DATABASETYPE.

Setting options:

  • Active database connection:

    Select desired Active database connection. The name has to correspond to one of the available database connections.

  • Select a Template.

    -> The respective connection string is entered.

  • Select JDBC or ODBC as Connection type.

  • The item Driver Class is omitted for ODBC. The setting options for JDBC are "net.sourceforge.jtds.jdbc.Driver" and "SQLite.JDBC.Driver".

  • Connection String: Replace the placeholders by the real data.

    The Connection String contains all needed information for the LinkDB access. (Setting up the ODBC data source is not required.) Admin rights are not required.

    All options of the connection string can be found in the respective driver documentation.

    Data is saved in odbc.cfg or jdbc.cfg.

  • Enter DB User and DB Password.

    Test the connection by clicking on Check connection.

  • Optionally, enter DBO user and DBO Password. This is required for changing the database schema like creation of table columns or saving the database.

    Test the connection by clicking on Check connection.