APPX Software Library

Chapter 8: Solve Connection and Import Problems

Check the dhsodbc.ini and appx.env Settings Files

If the DSN looks right but the connection still fails, check these two text files on the gateway computer. The paths below are from this installation. A different installation folder will change the second path.

FileWhat to check
C:\Windows\dhsodbc.iniThe [Environment] section and the gateway installation directory in TPEROOT.
C:\Program Files (x86)\AppxODBCserver\appx.dbs\appx.envThe APPX server name and login-manager port in APPX_DATA_SERVER.

The second file belongs in the selected SQL dictionary's folder, appx.dbs, for this recipe. Do not assume that a file named appx.env in bin is the one being read.

Open Command Prompt and run these commands separately:

type "C:\Windows\dhsodbc.ini"
type "C:\Program Files (x86)\AppxODBCserver\appx.dbs\appx.env"

The relevant dhsodbc.ini entries in this installation are:

[Environment]
TPEROOT="C:\Program Files (x86)\AppxODBCserver"
DB_NAME=appx
TPESQLDBG=N

Check that TPEROOT points to the gateway's installation folder, not bin, and that the folder contains appx.dbs. Keep the SQL dictionary name appx; this is different from the APPX database ID DMO. If the DSN selects another SQL dictionary, check that dictionary's .dbs folder instead.

For this edition, appx.dbs\appx.env contains:

APPX_DATA_SERVER=localhost:31055

That address identifies the APPX login manager. It is separate from the ODBC gateway address and port used by the desktop DSN. This recipe uses gateway port 1992 and APPX port 31055. On a gateway running on another computer, localhost means that gateway computer; replace it with the APPX server's actual name when needed.

The reviewed Windows gateway code reads TPEROOT from the INI file, appends the selected dictionary name plus .dbs, and reads appx.env there. Setting TPEROOT in a Command Prompt window does not correct that INI lookup.

Make a backup before editing either file. Use a text editor and keep the .ini and .env extensions; do not save an extra .txt extension. Close active ODBC clients before restarting the gateway service, then reopen the client and retry. Editing these connection settings does not itself require another ASQL import. If the change points to a different dictionary or APPX installation, check its imported definitions and sample query before using existing reports.