I have tried several ways to do this but here is a copy of the T-SQL script.
[red]
Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 41
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "ACCESSDB" reported an error. The provider did not give any information about the error.
Msg 7311, Level 16, State 2, Procedure sp_tables_ex, Line 41
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "ACCESSDB". The provider supports the interface, but returns a failure code when it is used.
[/red]
Thanks
John Fuhrman
Code:
EXEC sp_addlinkedserver
@server = N'ACCESSDB',
@provider = N'Microsoft.ACE.OLEDB.12.0',
@srvproduct = N'Access 2010',
@datasrc = N'D:\Access_BE.MDB'
GO
-- Set up login mapping using current user's security context
EXEC sp_addlinkedsrvlogin
@rmtsrvname = N'ACCESSDB',
@useself = N'True',
@locallogin = NULL,
@rmtuser = NULL,
@rmtpassword = Null
GO
-- List the tables on the linked server
EXEC sp_tables_ex N'ACCESSDB'
GO
[red]
Msg 7399, Level 16, State 1, Procedure sp_tables_ex, Line 41
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "ACCESSDB" reported an error. The provider did not give any information about the error.
Msg 7311, Level 16, State 2, Procedure sp_tables_ex, Line 41
Cannot obtain the schema rowset "DBSCHEMA_TABLES" for OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "ACCESSDB". The provider supports the interface, but returns a failure code when it is used.
[/red]
Thanks
John Fuhrman