0
votes

I want to get oledb provider for jet 4.0 in my sql. I am using 64 bit version of windows.

I have created a linked server to access the access database and import that database to sql.

So, I have written one stored procedure to create a linked server there i mentioned provider as Microsoft oledb jet 4.0.

I got error like this in 64 bit

'OLE DB provider 'Microsoft.Jet.OLEDB.4.0' cannot be used for distributed queries because the provider is configured to run in single-threaded apartment mode.'

In 32 bit windows it is working fine. I installed microsoft oledb jet drivers. But in 64 bit It is not being installed.

Can u pls tell me the suggestion to get provider oledb jet 4.0 in Sql linked servers.

2
Try using Provider=Microsoft.ACE.OLEDB.12.0; in your connection string instead of Provider=Microsoft.Jet.OLEDB.4.0 - Jenish Rabadiya
Is this windows forms or ASP? - Gnqz
This is also not working I also checked this before - tarun susarapu

2 Answers

0
votes

When you need to use MS Access database, you need to install a database access engine. Check the link: https://www.microsoft.com/en-us/download/details.aspx?id=13255 Also consider the version of the Access you have installed on the host machine in your connection string.

0
votes

For me what works is to install the database driver from: The 2016 Access Redistributable https://www.microsoft.com/en-us/download/details.aspx?id=54920 And then adjust my connection string for example:

connection.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.16.0;Data Source=F:\SKS\SKSDatabase\Orders.mdb";