4.7.2.  Database connection

In the Database connection category, define how the database (e.g. MSSQL, Oracle, etc.) is accessed.

[Note]Note

The configuration concept was changed in V12.6. There is no longer a dbproxy.cfg. The configuration can now be found in odbc.cfg or jdbc.cfg. This means that the database connection must be modified and the login will initially fail without modification.

Prerequisites:

  • ODBC driver: The functionality for using ODBC is automatically available.

    If the database is run via the AppServer, then the ODBC driver only needs to be installed on the server. It is only required on the clients if the database is accessed directly.

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

  • JDBC driver:

    All drivers installed at libs/all/java/jar are listed in the Available database connections dialog area in the Template list box (the ones listed are supplied and are always available).

    Others must be downloaded from the respective manufacturer (Oracle, Microsoft) and copied to the directory libs/all/java/jar. They are NOT installed by CADENAS.

    Please download them under one of the following addresses.

    They can then also be selected under Template.

Create database connection:

Use the New button to create the required database connections and fill in the respective fields to the right. Then select the required database connection [Active database connection] under Active database connection.

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

[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 use New to create connections that are referenced by the DATABASETYPE value.

Setting options:

  • Active database connection:

    Select the desired Active database connection. The name must match one of the available database connections.

  • Select a template [Template].

    -> The respective connection string is entered.

  • Select the connection type [Connection type] JDBC or ODBC.

  • The driver class [Driver Class] item is omitted for ODBC. The selection options for JDBC are "net.sourceforge.jtds.jdbc.Driver" and "SQLite.JDBC.Driver".

  • Connection string [Connection String]: Replace the placeholders with the actual data.

    The connection string [Connection String] contains all the information required to access the LinkDB. (There is no need to set up the ODBC data source.) Admin rights are not required.

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

    The data is stored in odbc.cfg or jdbc.cfg.

  • Enter the DB user [DB User] and DB password [DB Password].

    Test the connection by clicking on Test connection [Check connection].

  • Optionally, enter the DBO user and DBO password [DBO Password]. This is required for changes to the database schema such as creating table columns or for backing up the database.

    Test the connection by clicking on Test connection [Check connection].