Access error reference
Access error 3146: ODBC--call failed, how to find the real cause
An Access database linked to SQL Server, Oracle or MySQL through ODBC stops on “ODBC--call failed”. The message says almost nothing: the real cause is the server's message, which Access keeps alongside it.
The message

ODBC--call failed.
Error number 3146 is the same in every language: search for it if your Access is not in English. Microsoft describes it as a failed operation on data in an ODBC data source, for example when the source is on the network and the network is not available.
Where it shows up
When opening a linked table, or a form or report based on it, when saving a record, in a pass-through query, or in code: CurrentDb.Execute, OpenRecordset on an ODBC linked table.
Common causes
- the server does not answer: network down, VPN closed, server stopped or renamed;
- the timeout is reached: a long query exceeds the query's ODBC timeout (60 seconds by default);
- the server refuses the operation: insufficient permissions, duplicate key, constraint or foreign key violation, value too long for the column;
- a pass-through query written wrongly for the server, or a linked table whose structure changed on the server.
How to reproduce and check it
- Replay the action, then open the linked table on its own: if it does not open, the problem is the connection, not the form.
- Read the server's message: in code, the
DBEngine.Errorscollection holds the driver's error, before 3146. - Replay the same statement in the server's own tool (SQL Server Management Studio, for example) with the same account.
How to fix it
Start by showing the real cause, in the error handler and before any other DAO operation: Dim e As DAO.Error, then For Each e In DBEngine.Errors: Debug.Print e.Number, e.Description: Next e.
Then fix according to the server's message: account permissions, rejected data, or timeout. For a long query, raise the query's timeout: CurrentDb.QueryDefs("qryExport").ODBCTimeout = 300 (0 = no limit). If the server does not answer, see error 3151.
What Auscult reports
Auscult only runs the database on a copy. A server's data cannot be copied: so as not to change it, the analysis does not connect to the server. The report names the source (“server database (ODBC)”) and the linked tables that read it, and says what could not be tried without that data.
So it does not tell you whether the ODBC call fails on your network. To have the forms tried, analyse a copy of the database linked to local tables or to a test database.
Related errors
- 3151 — ODBC connection failed, when the connection itself does not succeed
- 3218 — could not update; currently locked
- 3197 — another user changed the same data
- The Access error reference, code by code