Chapter 8: Solve Connection and Import Problems
Check the Driver, Ports and Login Before Retrying
| Symptom | Action |
|---|---|
| The DSN is missing in the client | Check that both the client and driver are 32-bit and open SysWOW64\odbcad32.exe. |
| ASQL does not list the DSN | Use the setup script's AppxODBC Driver enumeration label and retain its separate Dharma 14 DLL path. |
-20038 Cursor not closed or the first ASQL query fails | Check the actual Driver path. The supplied Dharma 9 driver fails here; use the 6.2.1 compatibility-driver setup. |
Login returns -1016 | Re-enter the APPX credentials and check the gateway Host, dictionary name, APPX_DATA_SERVER endpoint and the running gateway Windows service and APPX login-manager Windows service. The code alone does not identify the cause. |
| SQLDriverConnect Failed | Try installing or repairing the official Microsoft v14 x86 runtime, then retry. If it persists, collect the full message and check connectivity and credentials. |
| The gateway does not start | Install or repair the Microsoft x86 runtime first. Check the executable path and Windows event messages, then use the conditional package repair only if a dependency is still missing. |
| The connection waits or times out | Check the actual gateway listener and the client's sqlnw-to-port mapping. This recipe uses Socket for the 5.5.4 backend; keep the tested Socket setting. |
| The query returns Table/View/Synonym not found | Check the selected SQL dictionary and repeat the ASQL COUNTRY metadata import. |
| Two statements produce a syntax error | Run the count and full-row query separately. |
| Excel's Power Query route fails | Use the tested Legacy Microsoft Query recipe. |
| Access shows old records after APPX changes | The table is a local copy. Repeat the import into a new table to obtain a fresh copy. |
Stop a client attempt that does not complete, retain the full error, and check a small count query before retrying. The PowerShell script limits each query to 30 seconds; that limit does not bound the driver's initial connection call.