7.5. ApplixWare

ApplixWare has an ODBC database interface supported on at least some platforms. ApplixWare 4.4.2 has been demonstrated under Linux with PostgreSQL 7.0 using the psqlODBC driver contained in the PostgreSQL distribution.

7.5.1. Configuration

ApplixWare must be configured correctly in order for it to be able to access the PostgreSQL ODBC software drivers.

Testing ApplixWare ODBC Connections

  1. Bring up Applix Data

  2. Select the PostgreSQL database of interest.

    1. Select Query->Choose Server.

    2. Select ODBC, and click Browse. The database you configured in .odbc.ini should be shown. Make sure that the Host: field is empty (if it is not, axnet will try to contact axnet on another machine to look for the database).

    3. Select the database in the box that was launched by Browse, then click OK.

    4. Enter user name and password in the login identification dialog, and click OK.

    You should see Starting elfodbc server in the lower left corner of the data window. If you get an error dialog box, see the debugging section below.

  3. The "Ready" message will appear in the lower left corner of the data window. This indicates that you can now enter queries.

  4. Select a table from Query->Choose tables, and then select Query->Query to access the database. The first 50 or so rows from the table should appear.

7.5.2. Common Problems

The following messages can appear while trying to make an ODBC connection through Applix Data:

Author: Contributed by Steve Campbell (), 1998-10-20

The axnet program's security system seems a little suspect. axnet does things on behalf of the user and on a true multiuser system it really should be run with root security (so it can read/write in each user's directory). I would hesitate to recommend this, however, since we have no idea what security holes this creates.

7.5.3. Debugging ApplixWare ODBC Connections

One good tool for debugging connection problems uses the Unix system utility strace.

For example, after getting a Cannot launch gateway on server, I ran strace on axnet and got

[pid 27947] open("/usr/lib/libodbc.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 27947] open("/lib/libodbc.so", O_RDONLY) = -1 ENOENT (No such file or directory)
[pid 27947] write(2, "/usr2/applix/axdata/elfodbc: can't load library 'libodbc.so'\n", 61) = -1 EIO (I/O error)

So what is happening is that applix elfodbc is searching for libodbc.so, but it cannot find it. That is why axnet.cnf needed to be changed.

7.5.4. Running the ApplixWare Demo

In order to go through the ApplixWare Data Tutorial, you need to create the sample tables that the Tutorial refers to. The ELF Macro used to create the tables tries to use a NULL condition on many of the database columns, and PostgreSQL does not currently allow this option.

To get around this problem, you can do the following:

7.5.5. Useful Macros

You can add information about your database login and password to the standard Applix start-up macro file. This is an example ~/axhome/macros/login.am file:

macro login
set_set_system_var@("sql_username@","tgl")
set_system_var@("sql_passwd@","no$way")
endmacro

Caution

You should be careful about the file protections on any file containing user name and password information.