1

I was wondering if anybody could point me to an example of how to query an mdb (Access database) from a .Net application using linked servers in SQL Server.

The current database is in Access, with the intention of later switching to SQL Server entirely, so I'd like to use LINQ-to-SQL or the entity framework (or other ORM such as NHibernate) to "future-proof" my code so it will be easy to switch once we migrate away from Access.

My current setup is querying the mdb file directly using an OLE data provider, but there is no LINQ data provider available and that is my strong preference.

Any tips or advice would be appreciated.

Thanks.

Ryan Weir
  • 6,377
  • 5
  • 40
  • 60

1 Answers1

0

Interesting idea. I don't know if this will actually work; although you'll be connecting to SQL Server, it will still proxy the queries off to the access database.

How can I link a SQL Server database to MS Access using link tables in MS Access?

Details how to add access as a source for a linked server.

You'd be better off going straight to SQL Server now IMHO. You'll probably get all sorts of random issues by proxying the access db via SQL Server.

Laurel
  • 5,965
  • 14
  • 31
  • 57
dash
  • 89,546
  • 4
  • 51
  • 71