Link to home
Start Free TrialLog in
Avatar of akivashapiro
akivashapiroFlag for Afghanistan

asked on

SQL Server Management Studio 2012 Setup for MS Access in Linked Server OPENROWSET

I want to be able to create a native SQL query in SQL Server that joins two tables, one from SQL Server and one from MS Access within SQL Server Management Studio 2012.

Notes: I have MS Access 2010 32 bit installed on the computer and am using SQL Server 64 bit.

I've tried the following, and get this error message when testing:
USE master;
  GO
EXEC sp_addlinkedserver
     @server = N'Access Test',
     @provider = N'Microsoft.Jet.OLEDB.4.0',
     @srvproduct = N'OLE DB Provider for Jet',
     @datasrc = N'D:\Test\Test.accdb';
  GO
 
Command(s) completed successfully.

TITLE: Microsoft SQL Server Management Studio
------------------------------

The test connection to the linked server failed.

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

Cannot create an instance of OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "Access Test". (Microsoft SQL Server, Error: 7302)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=11.00.3128&EvtSrc=MSSQLServer&EvtID=7302&LinkId=20476



I need to know

1. the driver to use and
2. where to download it
3. in order to use it in OPENROWSET or Linked Server

Thanks.
Avatar of PatHartman
PatHartman
Flag of United States of America image

This isn't actually an Access question since you are not using Access.  You are using Jet or ACE depending on whether you have an MDB or ACCDB you want to open.  It is not necessary to even have Access installed although installing Access will also install whatever drivers you need.  You might get better help in the SQL Server forum.

Jet is the database engine for MDB's and ACE is the database engine for ACCDB's.  Jet used to be installed by default with windows regardless of whether or not you installed Access.  I'm not sure about ACE.  But, since you installed Access, you would also have installed the drivers for it.
1. the driver to use and
There is no 64-bit driver for JET.
ASKER CERTIFIED SOLUTION
Avatar of akivashapiro
akivashapiro
Flag of Afghanistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of akivashapiro

ASKER

It worked.