Trace the ADO lifecycle
- Log the selected provider, sanitized connection string and exact
Connection.Openerror collection. - Test authentication and server reachability independently with the same 32-bit provider.
- Use explicit
Commandparameters with verified type, size, direction and order. - Record cursor location/type and lock type before opening a
Recordset. - Close recordsets, commands and connections deterministically; do not hide an earlier error with cleanup.
- Test transaction begin, commit and rollback behavior on the actual provider.
A provider installed for 64-bit applications is not available to a 32-bit VB6 process. DSN and provider enumeration must therefore be checked in the correct architecture.
Separate client from server defects
| Connection fails | Provider availability, connection string, authentication, TLS/network or server state. |
|---|---|
| Command fails | SQL dialect, permissions, parameter metadata or transaction context. |
| Recordset behaves differently | Cursor/lock support, server-side versus client-side cursor, or disconnected-recordset assumptions. |
Do not replace a provider until the application behavior it supplies is known. Cursor visibility, generated keys, parameter coercion and transaction boundaries can change even when the SQL text does not.
Compare VB6 ODBC troubleshooting, SQL Server applications, type mismatch diagnosis and the VB6 pillar.