SSMS Import of MS Access accdb external component has thrown an exception (System.Data)

Richard Williams 10 Reputation points
2024-12-10T09:58:07.5066667+00:00

I've been using SQL Server Management Studio for some time to import tables from MS Access into SQL Server.

Now I get an error

External component has thrown an exception. (System.Data)

when I choose an Access database to import from. This worked only a couple of weeks ago, any ideas what might have changed?

I only have Office 2016 installed. The full error is:

External component has thrown an exception. (System.Data)


Program Location:

at System.Data.OleDb.DataSourceWrapper.InitializeAndCreateSession(OleDbConnectionString constr, SessionWrapper& sessionWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at Microsoft.SqlServer.Dts.DtsWizard.DTSWizard.GetOpenedConnection(WizardInputs wizardInputs, String connEntryName) at Microsoft.SqlServer.Dts.DtsWizard.Step1.OnLeavePage(LeavePageEventArgs e)

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,278 questions
Access
Access
A family of Microsoft relational database management systems designed for ease of use.
425 questions
{count} votes

3 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 39,496 Reputation points
    2024-12-11T03:25:37.8566667+00:00

    Hi @Richard Williams,

    Please try to install both 32bit and 64bit version for access.

    You may download 32-bit and 64-bit access drivers from this source https://www.microsoft.com/en-us/download/details.aspx?id=54920 first, and then go to terminal -> go to downloads (or where you downloaded the access drivers to) -> run "accessdatabaseengine_X64.exe /quiet" -> then run "Accessdatabaseengine.exe /quiet"

    Or refer to Installing the Microsoft.ACE.OLEDB.12.0 Provider for Both 64-bit and 32-bit Processing

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.


  2. Richard Williams 10 Reputation points
    2024-12-14T09:40:25.9933333+00:00

    This did solve the problem but I had to uninstall the existing accessdatabaseengine_X64.exe and accessdatabaseengine.exe installations before reinstalling them. Then, a couple of days later the same error was occurring in SSMS. I tried both version 19 and version 20, same issue. So I uninstalled and reinstalled accessdatabaseengine_X64.exe and accessdatabaseengine.exe again. The problem has gone away, again! Can anyone explain this instability?

    0 comments No comments

  3. Richard Williams 10 Reputation points
    2025-01-10T12:20:15.0066667+00:00

    This solution worked but now, each time I try to use import I have to uninstall and then re-install accessdatabaseengine_X64.exe and accessdatabaseengine.exe again before the import works. Is there some way of stopping this from happening?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.