I'm trying to create an MVC application that uses an Access 2007 DB (.accdb). I can create the Model using DataSet. But if I try to create a Model using EntityFramework, I can't get past VS2008 wanting to make the connection string be a SQL server. Am I missing something, or does EF not play with Access?
Asked
Active
Viewed 1.1k times
5
-
1See http://stackoverflow.com/questions/648116/how-can-i-use-ms-access-as-a-provider-for-ado-net-entity-framework – Robert Harvey Feb 09 '10 at 19:48
1 Answers
7
The Entity Framework works only with ADO.NET providers that support it. To use your Access database, I assume you use the OleDB provider, which doesn't support EF. Microsoft provides only two ADO.NET providers that support EF : SQL Server, and SQL Server CE. However you can find third party providers for other DBMS :
- SQLite
- MySQL
- DevArt providers for several DBMS (commercial)
There are probably many others, but as far as I know, nothing for Access (which IMHO in not much of a DBMS anyway...)

Thomas Levesque
- 286,951
- 70
- 623
- 758
-
2There was really no need for that last parenthetical. Why don't you edit that out of your answer, which was otherwise ust fine? – David-W-Fenton Feb 09 '10 at 22:08
-
If what you say is true, what about using SQL Server and a linked server to get to Access/Jet/ACE? Then you could go through SQL Server and get to the Jet/ACE data as though it were SQL Server data, no? – David-W-Fenton Feb 09 '10 at 22:09
-
perhaps... to be honest, I'm not even sure what you're talking about... do you mean that you can query another database through SQL Server, similarly to Oracle's DB links ? – Thomas Levesque Feb 10 '10 at 01:41
-
SQL Server allows you do mount other SQL Servers and Jet/ACE databases as "linked servers" and then you can use them from your SQL Server database. It's kind of like Access linked tables. I would assume that's what Oracle provides, too, but I know nothing about Oracle (none of my clients are foolish enough to use such an expensive database). – David-W-Fenton Feb 11 '10 at 04:13
-