SuSE Support Database

Title: Applix data access to database via ODBC

---

Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
Deutsch
---

Applix data access to database via ODBC

Applies to

Applix: Version 4.4.1
Adabas: Version 6.1, 10.0

Request:

You would like to access a relational database, e.g. ADABAS D, from within Applixware Office using the Applix Data Gateway. This has become possible since SuSE Linux v. 4.4.1.

If you are using both Applixware version 4.4.1 (or later) and ADABAS D as delivered on Linux Office 99, you do not need to do anything.

Procedure:

Using ADABAS D, we will demonstrate how to access a relational database.
  1. First, please ensure that Applixware and the RDBMS run on the same server. The remote SQL server, however, still has to be started. Start the remote SQL server using the xcontrol program or enter
    x_server
    start
    
  2. You will need an ODBC driver to be run as a shared library under Linux. It is possible to load the driver using the iODBC driver manager. Save the library in /opt/applix/axdata/acshlib/lib. For ADABAS D, the library can be compiled using the following commands:
    export DBROOT=/usr/lib/adabas
    cd $DBROOT/lib/ ;
    gcc -shared -Wl,-Bsymbolic -Wl,-whole-archive \
        odbclib.a libsqlptc.a libsqlrte.a \
        -lc -lm -lncurses -o libadabas.so ;
    mv libadabas.so /opt/applix/axdata/axshlib/lib ;
    
  3. You have to tell Applixware the path to find the ODBC driver. Add the following entry to the file /opt/applix/axdata/axnet.cnf:
    libFor elfodbc /opt/applix/axdata/axshlib/lib
    
  4. Enter in the /etc/services file the following entries:
    axnet           5492/tcp                # Applix anywhere
    sql30           7200/tcp                # adabasd remote sql
    
  5. Become root and start the acnet server process. If ADABAS D has to be accessed, the DBROOT variable has to be valid:
    export DBROOT=/usr/lib/adabas
    /opt/applix/axdata/axnet
    
    or use the initialization script /sbin/init.d/axnet

  6. The user needs the file ~/.odbc.ini in his home directory. The data source has to be entered in this file.
    [ODBC Data sources]
    adabas=adabas database
    
    [adabas]
    Driver=/opt/applix/axdata/axshlib/lib/libadabas.so
    
    [ODBC]
    InstallDir=/opt/applix/axdata/axshlib
    
  7. Unfortunately, ADABAS D needs its own /var/spool/sql/config/odbc.ini and the following entries in it:
    [adabas]
    DSN = adabas
    SERVERDB = MYDB
    SERVER = localhost
    
  8. Now it is possible to run and access the database. Start Applix Data and choose an ODBC data source. Click 'Query' and then 'Choose Server'. Go to 'ODBC', click it and then select 'Browse'. You will see a dialog giving you a choice of database servers. Choose "Adabas" (adabas database) and click 'OK' twice. You are about to be connected to the database; you still need to enter your login and your password (in the ADABAS D demo version both features are just demos).

  9. Now you are in the right place to choose tables by going to 'Query'. Choose among 'Available Tables' the ones you need and copy them by clicking on the right arrow to the 'Tables to Query' window. If you select more than one table and you want to view them, click on the 'conditions' button and select the 'join' condition. It is possible to display the tables by clicking "Query -> Query".

    ---

    See also:

    ---

    Keywords: APPLIX, OFFICE, DATABASE, ODBC, ADABAS, SQL

    ---

    Mainpage ---- Searchform ---- History ---- Versions ---- Categories ---- Contents
    Deutsch
    ---

    SDB-applix_data, Copyright SuSE GmbH, Nuremberg, Germany - Version: 27. Oct 1998
    Impressum - Last generated: 24. Feb 1999 14:42:54 by maddin with sdb_gen 1.00.0