Get error when scaffold MS Access database (Could not find installable ISAM)

db-first entity-framework-6 jet-ef-provider ms-access

Question

I am using Entity Framework 6 to manage an MS Access database (mdb file). I am now using this project (bubibubi / EntityFrameworkCore.Jet) But in their example, it uses a * .accdb file while I'm using a * .mdb file. When i execute:

Scaffold-DbContext -Connection "Provider=Microsoft.ACE.OLEDB.12.0;Data Source='C:\database.mdb';Database Password=mypass" -Provider EntityFrameworkCore.Jet

I get this message: Could not find installable ISAM.

I don't know and don't find what i need to do.

I'm use C#, Console App, .Net Framework 4.6.1

Edit: If i use the new Access database files (.accdb) that work fine. But this is a legacy project and i need manage a old access files (.mdb)

1
0
7/17/2019 9:07:39 PM

Accepted Answer

Your connection-string would be for an .mdb (Access 2003-) file. Check connection strings here

You need the ACE OLEDB provider. Standard Security:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\myFolder\myAccess2007file.accdb;
Persist Security Info=False;

However, read this thread first:

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.

practically impossible is very compelling.

8
5/23/2017 10:30:49 AM

Popular Answer

OLEDB cannot support entity framework because entity framework needs that the entity framework provider generates the right queries for the specific database (while OLEDB is general DB access). You need a specific provider for Microsoft Access.

You can find a Microsoft Access Entity Framework Provider here https://jetentityframeworkprovider.codeplex.com/

EDIT
The Access EF provider is now hosted on GitHub
https://github.com/bubibubi/JetEntityFrameworkProvider



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow