Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADO.NET Entity Framework with OLE DB Access Data Source

Tags:

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.

like image 406
Tim Long Avatar asked Feb 14 '10 02:02

Tim Long


People also ask

Does ADO.NET use OLE DB?

First of all, it is good to know that ADO.NET used OLE DB providers to access data while OLE DB uses ODBC to access relational databases.

Does Entity Framework use OLE DB?

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).

How does ADO complement OLE DB?

How does ADO complement OLE-DB? Service providers: the service provider acts like a data consumer of the data provider and as a data provider for the data consumer (end-user application).


1 Answers

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

like image 76
JeremyS Avatar answered Oct 19 '22 00:10

JeremyS