create new tag
view all tags

Debugging APPX/ODBC

The top two reasons for APPX/ODBC problems are:

1) Old version installed.

Even if you're running APPX release 3.5, you should download the current "APPX ODBC Server" from the Desktop Downloads page.

2) Stack size too small.

All APPX/ODBC users should use ' stackfix.exe' to increase the size of the stack for the PC programs they are using with APPX/ODBC.

Following is a checklist of the steps asql.exe goes through when installing APPX/ODBC. If you run into a problem installing APPX/ODBC, the first step in debugging is to determine how far through the checklist asql gets.

First, a few terms:

<WINDISK> is the drive where Windows is installed (usually c:)
<INSTALLDIR> is the place where the user wants to install APPX/ODBC

1) The setup program should display the following screens:

Readme - should display<INSTALLDIR>\readme.txt file
Choose Installation Location - should default to<WINDISK>\AppxODBC
Select Program Folder - should default to AppxODBC
Start Copying Files
Progress Indicator
Setup Complete

2) The setup program will install the AppxODBC driver, MFC, and ODBC

appxsetp.dll - the AppxODBC connection dialog
appxodbc.dll - the AppxODBC driver

MFC42.DLL - MS Foundation Classes 4.2
MSVCRT.DLL - MS C Runtime library

MSJT3032.DLL - Jet 3.0 engine
ODBCTL32.DLL - ODBC/SQL escape parser
VBAJET32.DLL - VBA Expression service for Jet
MSJTER32.DLL - Jet 3.0 error services
MSJINT32.DLL - Jet 3.0 internationalization
ODBCJI32.DLL - Localized strings for Desktop drivers
ODBCJT32.DLL - Desktop database ODBC drivers
ODBCAD32.EXE - ODBC Administrator (in Control Panel)
12520437.CPX - Code page
12520850.CPX - Code page
MSCPXL32.DLL - Code page translator
MSVCRT20.DLL - MS C Runtime library, version 2.0
ODBC16GT.DLL - ODBC 16-bit generic thunk dll
ODBC32GT.DLL - ODBC 32-bit generic thunk dll
DS16GT.DLL - Driver Setup 16-bit generic thunk dll
DS32GT.DLL - Driver Setup 32-bit generic thunk dll
ODBCCP32.CPL - 32-bit ODBC control panel component
ODBCCP32.DLL - 32-bit ODBC installer/administrator
ODBCINT.DLL - ODBC error messages and dialog boxes
ODBCCR32.DLL - ODBC Cursor Library
ODBC32.DLL - 32-bit Driver Manager
VEN2232.OLB - VBA English messages
VBAR2232.DLL - VBA Expression service

3) The setup program will install the following files in <INSTALLDIR>

mdsql.exe - command line SQL interface (currently non-functional)
mdcreate.exe - utility to create a Dharma SQL Database
asql.exe - APPX Schema importer
readme.txt - Release Notes (also displayed by setup program)
lib\dherrors - English spellings for SQL Server error messages

4) The setup program should create an ODBC data source, you can confirm this
by running the ODBC Administrator (usually "32bit ODBC") from the Control

1) The "Drivers" panel should list a driver named "AppxODBC" and the
filename for the driver should be "appxodbc.dll"

2) The "System DSN" panel should list a System Data Source named
"appxodbc" with a driver of "AppxODBC". Selecting the appxodbc
datasource and clicking "Configure" should display a dialog titled
"Dharma ODBC Setup", with the following entries:

Data Source Name "appxodbc"
Description "Appx ODBC Data Source"
Host ""
Database "appx"
Data Dir ""
User ID "dharma"
Password "none"

5) The following registry entries will be made:

DataDir ""
Database "appx"
Description "Appx ODBC Data Source"
Driver "<WINSYSDIR>\appxodbc.dll"
Host ""
Password "none"
User ID "dharma"

HKEY_LOCAL_MACHINE\Software\ODBC\odbc.ini\ODBC Data Sources
appxodbc "AppxODBC"

Driver "<WINSYSDIR>\appxodbc.dll"
Setup "<WINSYSDIR>\appxsetp.dll"

6) The readme.txt file tells the user to run the following commands:

C:\> cd \appxodbc
C:\AppxODBC> mdcreate Appx

This should create a subdirectory called "appx.dbs" - this directory
contains the actual Dharma SQL database.

This step should also create a file in the Windows (or WINNT) directory
called "dhstodbc.ini". This file should contain:


7) readme.txt also explains how to import APPX file descriptions into the SQL database.

The <INSTALLDIR>\asql.exe program does the following:

1) Create a log file titled "c:\appxodbc.log"
2) Connects to the AppxODBC data source using "DSN=appxodbc; UID=dharma; PWD=none;"
3) Finds a non-standard function (bld_table_script) in the AppxODBC driver
4) Executes a "CREATE TABLE" command for the 0SA SYSDIR file
5) Reads each record from the 0SA_SYSDIR table
6) Displays the list of SYSDIR entries to the user
7) When the user selects a file he wishes to make available through ODBC, builds and executes a "CREATE TABLE" command for the desired file

If the user is presented with a list of SYSDIR record in step 6, AppxODBC is installed.

If the server is using APPX_PD_SIGNS=FD (this is typically done by sites which access data stored in CISAM), then APPX_PD_SIGNS=FD must be set on both the server and the client.

If this variable is not set in both places, one error which could result is that all fields of all records will show up as #Deleted# when viewing a table.

Note that to have APPX_PD_SIGNS=FD set correctly on the server, you must set it either in a system startup script like one of the rc files, in your start-appxd.sh, or in your server's global appx.env file. (NOT the individual users' profiles, since they don't get executed when an appxd connection is made.)

See also the following ECRs:

#4500 - how to debug AppxODBC Server?
#4503 - AppxODBC throughput rates
#4533 - How2 edit AppxODBC asql table
#4547 - AppxODBC: All Rows "#Deleted"
#4760 - AppxODBC Windows SQL utility
#4796 - AppxODBC: CTL3D32.DLL version
#4826 - AppxODBC & CrystalRp: Connect
#4916 - APPXODBC MS-Access access den
#4950 - MSQRY32 caused a stack fault
#4992 - MS-Access: cells all "#Name?"
#5032 - APPXODBC and Crystal Rep 5.0
#5084 - mdcreate: Can't open DB-20054
#5114 - asql debugging

When debugging APPX/Net, or APPX/ODBC to remote APPX data problems, there are two levels of APPX/Net protocol that can be logged: APPX_NET_LOG (the lower level) and APPX_NETIO_LOG (the upper level). (Protocol is the mechanism by which the client and server talk with each other.)

The lower level (NET LOG) is common to both APPX/Net and the APPX Presentation Server.

On the Client side, the lower level protocol is monitored via the environment variables APPX_NET_LOG and APPX_NET_LOG_MASK. Ex:


On the Server side, the lower level protocol is monitored via the environment variables APPX_NETIO_SERVER and APPX_NET_LOG_MASK. Ex:


On the Client side, the upper level protocol is not being logged as of 4.0.a.

On the Server side, the upper level protocol is monitored via the environment variables APPX_NETIO_LOG and APPX_NETIO_CODE._ Ex:


When running APPX/ODBC to remote APPX data, you also have APPX/ODBC logging on the client side:


See Setting Environment Variables for discussion of ways environment variables can be set.


Read what other users have said about this page or add your own comments.

Topic revision: r1 - 2012-03-18 - ChrisBrower
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback