20

Has anyone found a way to make the ADO.NET Entity Framework work with OLE DB or ODBC data sources? Specifically, I need to work with an Access database that for various reasons can't be upsized to SQL.

This MSDN page says:

The .NET Framework includes ADO.NET providers for direct access to Microsoft SQL Server (including Entity Framework support), and for indirect access to other databases with ODBC and OLE DB drivers (see .NET Framework Data Providers). For direct access to other databases, many third-party providers are available as shown below.

The reference to "indirect access to other databases" is tantalising but I confess that I am hopelessly confused by all the different names for data access technology.

3
  • I couldn't find a way to do it. Commented Feb 14, 2010 at 3:43
  • This is outside my bailiwick, but have you consider mounting the Access/Jet/ACE database as a linked server in SQL Server, and then utilizing the SQL Server provider? That would be the way I'd read the reference to "indirect access." Commented Feb 14, 2010 at 20:02
  • 2
    I'm pretty sure the "(including Entity Framework support)" bit applies only to SQL Server insofar as the MS provider goes. Linked server might be worth a shot. Commented Feb 15, 2010 at 14:21

3 Answers 3

1

To the best of my knowledge, this is not possible using an entity framework. You can however, use linq to dataset to access your Access (no pun intended) database.

http://msdn.microsoft.com/en-us/library/bb386977.aspx

Sign up to request clarification or add additional context in comments.

Comments

1

EF cannot use OLE DB directly because an EF provider have to translate c# into specific SQL syntax (OLE DB is a connection to several DBMSs with several SQL syntaxes).

If you need an EF 6.1 provider for MS Access you can have a look here https://jetentityframeworkprovider.codeplex.com/

Comments

0

I am not so sure about using Access with EF in particular, but it does seem possible to use linq with access. http://social.msdn.microsoft.com/Forums/en/adodotnetentityframework/thread/985a1048-cf56-4bb0-b664-61fbf4957890

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.