Kernel Data Recovery Blog

How to fix Access database error 3151?

Read time 5 minutes

It’s been a while since a common issue raised by many users that they are facing error when they are opening Access Database. The error code is 3151 which is ultimately a result of ODBC connection failure in Access.

According to a user’s query I was going through, he claimed that he recently changed SQL servers with a new name, IP and DSN; he also created a new ODBC and made few changes in link tables. He was successful in updating the tables to the new SQL server, but as soon as he tried to run a form to update territories, he faced this ‘run time error 3151 ODBC connection failed’. The user was using the Access FE application connecting to a BE SQL.

This error happens when the user is using ODBC connection to connect to Microsoft Access; here the ODBC connection is also connected to Microsoft SQL server. The error message pops up is ‘[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 this issue?

To overcome this issue, you can try the below-mentioned steps and see if it works for you. Open the Access Database and:

  1. Start with clicking on the File button.
  2. From the File menu. Select Get External Data and click on Link tables.
  3. There you will find a File type list, from there select ODBC Database and click on Machine Data Source.
  4. Here, click on New and select System Data Source. Click on Next to proceed.
  5. At this stage click on SQL Server option. Click on Next and then click on Finish.
  6. This is where you enter the details, so enter the ODBC connection and SQL server name in the respective places. Click on Next to proceed.
  7. Now select the desired Database and click on Next. Click on Finish.
  8. Now, it is the time when you test the ODBC connection to SQL Server.
  9. Now, you need to keep clicking the OK button until it takes you back to the SQL server login.
  10. Finally, enter the login credentials of the SQL server database and click on OK.

So, this is how you can fix this error by following a few simple steps. Error 3151 is quite challenging and most commonly faced error recently, but it is not the only error or issue you may face while using Access. You may also face many other issues one of which is Access Database Corruption, which neither is easy to solve, nor it has many solutions. So, to keep your Access always working and corruption free, you need to keep your Access files healthy. For that, you can figure out the causes for Access Database Corruption and if corruption is already there you can fix it with the help of an automated tool.

What is that automated tool we discussed about?

Kernel for Access Database repair software. It is a third-party solution to repair an Access database file. It instantly solves the corruption issue with Access database files; it can also retrieve permanently deleted data and much more. Let’s see how it works.

  1. Select an MDB file and click on Open.
  2. Now, click on the Repair button to proceed.
  3. Once the repair process is done, have the preview of the file. Click on Save button.
  4. Provide a destination and name to the recovered file. Click on Save to complete the process.
  5. The file is repaired and saved successfully.