MS ACCESS ODBC--Call Failed

ODBC–Call Failed

Short answer: “ODBC–call failed” means Access asked SQL Server (or another ODBC database) to do something and it refused, but Access hides the real reason. First reveal the actual SQL Server error. The usual causes are a lost connection, a login problem, an outdated or new ODBC driver, a query timeout, a changed table, or data the server won’t accept.

Reviewed by Anthony Passeri, MBA, certified Microsoft Access Expert with 21+ years of Access development.

Step 1: See the Real Error Message

“ODBC–call failed” (Access error 3146) is a generic wrapper. The real SQL Server message is stored in Access’s error collection, and you can read it with a few lines of VBA in your error handler:

Dim e As DAO.Error
For Each e In DBEngine.Errors
    Debug.Print e.Number & ": " & e.Description
Next e

Run it right after the failure (for example, in the error handler of the code that failed), then press Ctrl+G to see the messages in the Immediate window. The last message is usually Access’s generic one; the ones before it are SQL Server’s actual explanation.

No code involved? Try opening the linked table directly. Access sometimes shows the detailed message in a second dialog.

Step 2: Match the Real Error to a Fix

What the real message saysLikely causeFix
“Login failed for user”Wrong or expired credentials, or the user has no SQL Server loginCheck the login and password, or grant the Windows user access in SQL Server
“Server does not exist or access denied” / “TCP Provider” / “Communication link failure”Server down, network or VPN dropped, firewallCheck the server and network, then relink
“Certificate chain was issued by an authority that is not trusted” / “SSL Provider”ODBC Driver 18 encrypts by defaultSee “The ODBC Driver 18 Encryption Problem” below
“Invalid object name” / “Invalid column name”Table or column renamed or removed on the serverRelink tables with the Linked Table Manager
“Query timeout expired”Query took longer than 60 secondsIncrease ODBC Timeout or speed up the query
“The SELECT/INSERT/UPDATE permission was denied”The user lacks rights on that tableGrant permissions in SQL Server
“Cannot insert the value NULL” / “conflicted with the CHECK constraint” / “String or binary data would be truncated”Data the server won’t acceptFix the data or the table design
“The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value”A date before 1753Correct the date, or use datetime2 on the server

Fix: Lost Connection

If errors appear after the network blips, the VPN drops or the server restarts, Access’s connection is broken. Close and reopen the database, then relink if needed. Frequent drops point to the network itself; see Your Network Access Was Interrupted and Slow Over VPN and the 2 GB Size Limit.

When tables change on the server, Access’s links go stale.

  1. Go to External Data > Linked Table Manager.
  2. Select the affected tables (or all of them).
  3. Choose Refresh (or Relink if the server or database name changed).
  4. Reopen the tables to test.

The ODBC Driver 18 Encryption Problem

Microsoft’s ODBC Driver 18 for SQL Server encrypts connections by default. If your SQL Server doesn’t have a certificate your computers trust, connections that worked with older drivers suddenly fail. Options:

  • Best: have IT install a trusted certificate on the SQL Server.
  • Quick fix on a trusted internal network: add TrustServerCertificate=Yes to the connection string, or check “Trust server certificate” in the DSN setup.
  • Short-term: keep using ODBC Driver 17, which can be installed side by side with Driver 18.

Download either driver from Microsoft’s ODBC driver download page.

Fix: Driver and DSN Problems

  • Old driver: links using the legacy “SQL Server” driver lack support for newer features and security. Relink with ODBC Driver 17 or 18.
  • Driver missing on a new PC: every computer running the database needs the same driver installed.
  • 32-bit vs 64-bit DSN: Windows has separate 32-bit and 64-bit ODBC administrators, and a DSN created in one is invisible to the other. It must match your Office bitness. Better still, use DSN-less connections, with the connection details stored in the linked tables, so nothing needs setting up on each PC.

Fix: Query Timeouts

Linked queries give up after 60 seconds by default. Open the query in Design view, open the Property Sheet, and raise ODBC Timeout (0 means no limit). The better fix is speeding up the query: filter on indexed columns, avoid Access-only functions SQL Server can’t process, or move heavy work into a SQL Server view or stored procedure. Good design helps; see Designing Access Tables and Relationships.

Fix: Data the Server Rejects

SQL Server enforces rules Access may not: required fields, check constraints, field lengths and date ranges. Find the record that fails and correct it, or adjust the table design so Access and SQL Server agree. If saved records then show #Deleted, see #Deleted Showing in Records.

If the database won’t compile on a new PC because a library is missing, see Compile Error: Can’t Find Project or Library.

When to Get Help

ODBC errors usually mean the Access-to-SQL Server setup needs tuning. Our Access to SQL Server migration team fixes drivers, links, keys, permissions and slow queries. For error handling and logging in VBA, see VBA debugging and enhancement; for ongoing help, maintenance and support. Weighing where to go next? See Power Apps vs SQL Server vs Staying in Access.

Still getting ODBC errors? Book a free diagnostic and we’ll find the real cause.

Frequently Asked Questions

What does “ODBC–call failed” mean in Access?

It means the ODBC database, usually SQL Server, rejected a request from Access. It’s a generic message that hides the specific reason, which you can reveal through the DBEngine.Errors collection in VBA.

How do I see the real error behind ODBC–call failed?

In your VBA error handler, loop through DBEngine.Errors and print each error’s number and description. The entries before Access’s generic message contain SQL Server’s actual explanation.

Why did ODBC stop working after installing a new driver?

ODBC Driver 18 encrypts connections by default. If SQL Server lacks a trusted certificate, connections fail. Install a trusted certificate, set TrustServerCertificate=Yes on a trusted network, or keep using Driver 17.

How do I fix an ODBC timeout in Access?

Raise the query’s ODBC Timeout property (the default is 60 seconds), or speed up the query with indexes, simpler criteria or a SQL Server view.

Talk to an Access Expert

Not sure what this means for your database? Book a free diagnostic call. No sales pitch, just a straight conversation about what makes sense for your situation.

Book a Free Diagnostic

Phone: 623-267-5720

Email: info@accessevolved.com

Access Evolved | 19580 W Indian School Rd, Ste 105 #815, Buckeye, AZ 85396

Sources

The DBEngine.Errors technique, DSN bitness behavior, ODBC Timeout default and SQL Server error messages reflect standard Access and SQL Server behavior and Access Evolved’s own experience. Exact SQL Server message wording varies slightly by version

Scroll to Top