MS Access Run-Time error '3146' ODBC--call failed

Paulo Torrinha 1 Reputation point
2022-02-14T11:16:54.25+00:00

Hi,

we are using MS Access with some dynamic VBA queries using DAO (because we use Linked Table connected to CLOUDERA Hive using Cloudera ODBC DRIVER).
When running this query's we get Run-time error '3146' ODBC--call failed, after doing some research and doing a trace for ODBC Calls (check above) we see that is related to QueryTimeOut parameter, the Cloudera ODBC Driver doesn't implement this parameter, I've checked that a possible solution could be change the registry parameter QueryTimeout at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Jet\4.0\Engines\ODBC, I've done it but it didn't work. I've also seen some suggestions for using queries Object because on the property sheet you have a parameter ODBC Timeout, which you can modify. The problems is that we have a lot of dynamic queries being created according to input data on forms. Is there any other way to fix this without having to change the structure of this Access?? You should be able to set this property generally...

Thanks a lot.

Database1 4d8c-a80 EXIT SQLSetStmtAttrW with return code 0 (SQL_SUCCESS)
SQLHSTMT 0x0684B720
SQLINTEGER 0 <SQL_ATTR_QUERY_TIMEOUT>
SQLPOINTER 60
SQLINTEGER -5

Database1 4d8c-a80 EXIT SQLExecDirectW with return code -1 (SQL_ERROR)
HSTMT 0x0684B720
WCHAR * 0x21F71F8C [ -3] "SELECT XXXXXXXX"
SDWORD -3

    DIAG [S1T00] [Cloudera][Hardy] (72) Query execution timeout expired. (72) 
Access Development
Access Development
Access: A family of Microsoft relational database management systems designed for ease of use.Development: The process of researching, productizing, and refining new or existing technologies.
859 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Suyash Thomson 1 Reputation point
    2022-06-01T10:37:31.66+00:00

    The “3146 – ODBC Connection Failed” error message displays as a result of a faulty network connection. The major reason for the run-time error 3146 to happen is the corruption of the Windows system files.

    Here are some manual methods to get rid of ODBC call failed error 3146 in MS Access:

    Method 1: Remove ODBC 1.x Driver Manager

    To fix this issue it is advised to remove the ODBC 1.x Driver Manager (Odbc.dll) and replace it with ODBC 2.x Driver Manager (Odbc.dll) in the primary path.

    Method 2: Advanced Computer User Resolution:

    1. Turn on your system and run as an administrator.
    2. Go to the start button and go for All Programs, Accessories, System, and after that opt for System Restore.
    3. Commencing the subsequent screen, press “Restore my machine to a previous time” and then hit NEXT.
    4. Locate mainly present restore point inside the “select a restore date” list, and click Next after that.
    5. On the verification screen of the system click Next.
    6. When restoration is done, Reboot the system.

    And if still these solution doesn’t work then try some third-party tool to repair the corrupted access database.

    Best Regards,

    Suyash

    0 comments No comments