Frequently encountering Microsoft Access runtime error – ODBC connection failed? Don’t know why this error is coming every time when trying to use the ODBC connection to connect to Microsoft Access or how to fix it? No need to worry…! because this post will help you in providing answers of all your queries regarding Access error 3151 ODBC connection to failed error.
Short Information On ODBC Data Sources
ODBC (Open Database Connectivity) is one such protocol which is mainly used to connect MS Access database to any other external data sources like Microsoft SQL Server. On the other hand, ODBC Data Source is a combination of source data and the connection information which is needed to access that particular data. Here are some few examples of Data Source: SQL Server, a spreadsheet, Oracle RDBMS and text file. Whereas example of connection information comprises server location, database name, logon ID, password, various ODBC driver options which defines how to get connected to data source. Well such information can be achieved from the database administrator to which you want to get connect.
In Access, ODBC data sources are used to connect data source external to Access that doesn’t contain any built-in drivers.
In that case, for the connection of data source, you must attempt the following procedures.
- Appropriate installation of the ODBC driver on system, which is having the data source.
- You need to define data source name (DSN) by making use of the ODBC Data Source Administrator. In order to store information about the connection in Microsoft Windows registry or a DSN file. Or connection string in VB code to transfer the connection information directly to ODBC Driver Manager.
Have a look:
About Access 3151 Odbc Connection Failed Error
Odbc Connection Failed Error is very common claimed error message by several of the access database users. It is observed that this type of ODBC Connection issue generally arises when some changes done in SQL servers with a new name, IP and DSN; or creation of a new ODBC and modification done in link tables. You may get success in updating the tables to the new SQL server but soon when you try to run a form to update. You will receive the ‘run time error 3151 ODBC connection failed’.
So all in all the error 3151 odbc connection to failed comes when user is using ODBC connection to connect to Microsoft Access. Here is the following error that pop-up in your screen
‘[Microsoft][ODBC Microsoft Access Driver] ODBC–connection to failed’ or DMS-E-GENERAL, A general exception has occurred during operation ‘asynchronous open.’
How To Fix Access Runtime Error 3151- ODBC–Connection To Failed
To fix Access database ODBC–Connection To Failed error here are the best possible fixes mentioned. Let’s see what the first method is says:
Method 1: Fix “With SQL Server Authentication” Option
At the time of creation of ODBC connection to SQL server, make selection of the login ID and password given by the user. Make conformation of the same thing in Microsoft Access, where System Data Source and Machine Data Source is been used to create the ODBC connection.
Here is how to perform this procedure –
- Open your Access Database and go the File menu, tap to the Get external data and then Link tables options.
- Now from File Types list, choose the ODBC database.
- Hit the Machine Data Source option.
- Tap to the New option.
- Choose the System Data Source and select the Next option.
- Now hit to the SQL Server option. After that tap to the Next and then finish option.
- Assign name for ODBC connection and SQL server in the given text boxes.
- Hit the next option and make a check over the “With SQL server authentication using a login id and password entered by the user” option.
- Hit the Next and select the appropriate database.
- Click Next and Finish. At this time you may test the ODBC connection to SQL server.
- Click OK more than a few times until you come back to SQL Server login page.
- Enter login ID and password to SQL server database and hit the OK option.
- Now, select the Save Password checkbox.
After trying out the above fixes now you must have overcome the issue of ODBC Connection for an Access Database. but if in case it won’t get success then approach for the second one.
You may also like:
Method 2: Set Up An ODBC Connection For An Access Database
It’s important to perfectly setup the ODBC connection for the Access database. So, just check out whether you have done it correctly or not. This will also help you in learning how to set up ODBC connection for Access Database with from error.
1.On your windows desktop tap to the Start >Settings >Control Panel > open the Administrative Tools control panel.
2. After the opening of the Administrative Tools window, make double click on the Data Sources (ODBC).
3. Now In the ODBC Data Source Administrator dialog box, hit to the Add
4. After that in opened Create New Data Source dialog box, hit the Microsoft Access Driver (*.mdb) and then to the Finish
5. For assigning the data source name enter Parcel_Owners, in the ODBC Microsoft Access Setup dialog
6. Also enter its description like “Parcel owner information.”
7.In the same dialog box under Database option, click the Select
8. After this Select Database dialog box will get open on your screen, search for the sample files and choose the Assessor.mdb file. You need specify the database for data source.
9. Tap to the OK option in all the opened Select Database, ODBC Microsoft Access Setup, and ODBC Data Source Administrator dialog boxes.
10.After completing this entire task, close the Administrative Tools control panel.
This is how you can fix the following Access Error 3151- ODBC–Connection To Failed just by following these simple steps.
Recommended Option To Keep Access Database Safe And Error Free:
MS Access is not only bounded with this particular ODBC Connection Failed error. There are many other errors frequently occurs which may damages your whole Access Database or results to get stuck in corruption issues. So, if you want to keep your access database files safe-side and free from any corruption glitches then also keep proper and updated backup of your Access database.
But if you are already dealing the access database corruption issue or the error conquered after the access database file corruption then also you need to worry for it. Just try the professional Access Database Repair And Recovery tool to effectively repair Access database MDB/ACCDB files.
This MS Access recovery software works efficiently to repair corrupt/damaged Access database. Apart from that the software deeply scans every segment of corrupted access database and removes all glitches from it. The tool is just perfect to recovers all the items of Access Database files like Tables, Queries, Indexes and Macros etc. safely and securely without any issue.
Hopefully, the aforementioned manual tricks will troubleshoot the Access Error 3151- ODBC Connection Failed error. So, try them out and do share your experiences with us in our comment section. but apart from this error if you have query about any other access database related error or issue then ask in our FAQ section.