Access shows only "ODBC--connection to … failed" (3151)
When opening or linking a table, Access reports error 3151 “ODBC–connection to '…' failed” without saying why.
The driver knows the actual reason; this page shows where to find it.
Environment
Access and DAO, both bitnesses; other applications receive the cause as a driver message.
Cause
On a failed connection attempt, Access shows only its own number. Access discards the actual message from the driver or the service – wrong password, expired or blocked key, missing second factor, untrusted certificate, unreachable service, invalid setting in the connection.
Resolution
- Turn on the driver's tracing, restart Access, and open the table again.
Search the file for the line
SQLDriverConnectWand the message after it. Common reasons:Message Continue with “… UntrustedRoot …” 08S01 "UntrustedRoot" “Der persönliche Schlüssel ist unbekannt.” / “… ist abgelaufen.” / “… ist gesperrt.” (The personal key is unknown. / … has expired. / … is blocked.) have a new key issued; Sign in with a personal key “The driver sends a password only over https or to this computer.” switch URLtohttps“The connection doesn't name the service's address (URL).” add URLto the connection or data sourceHTTP 401 with Wkl-Totp, without a dialogthe application allows no dialog; specify TOTP/SESSION- If the trace names only an HTTP status, look in the service's log at the same time.
Verification
After the correction, the table opens; after SQLDriverConnectW, the trace shows the response
HTTP 200 to $metadata.