Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
568 views
in Technique[技术] by (71.8m points)

ms access - Does Microsoft Jet DB work with Entity Framework?

In this forum here , someone mentions that Entity Framework does not work with Access (Jet DB - .mdb). However it seems that there is a provider for Jet DB as described here

Which makes me think that the only thing I need with Entity Framework is to define the follwing before I define the models:

<connectionStrings>  
    <add name="ProductContext"
         providerName="Microsoft.Jet.OLEDB.4.0"
         connectionString="Source=C:mydatabase.mdb;Jet OLEDB:Database
                           Password=MyDbPassword;"/>
</connectionStrings> 

Does anyone know if Entity Framework works fine with Jet DB, I want to make sure it does before I start since my design document depends on this fact.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Entity Framework does not support OLEDB connections, so your connection string will not work. It is practically impossible to get Entity Framework to collaborate with MS Access. You will either need to dump the MS Access part of your design, or the Entity Framework part.

The closest you could get using MS Access is using strongly typed datasets and Linq-to-DataSet http://msdn.microsoft.com/en-us/library/bb386977.aspx

Or, considering going with SQL Express instead (it's free) http://www.microsoft.com/sqlserver/en/us/editions/2012-editions/express.aspx


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...