question

AndrewHsiao-6094 avatar image
0 Votes"
AndrewHsiao-6094 asked DanielZhang-MSFT commented

EntityframeworkCore How to connect with odbc driver

hello
I had success get the access driver by
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=abc.accdb" ConnectionString
now I want to use odbc driver to connect access

use connectionstring is
string odbcstr = "Driver={Microsoft Access Driver (*.mdb)};dbq=d:\\123.mdb"
but fail ,

where do I get any resource data connection sample ?
DbContextOptionsBuilder class
optionsBuilder.UseJet(odbcstr,OdbcFactory.Instance)

dotnet-entity-framework-core
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @AndrewHsiao-6094,
May I know if you have got any chance to check my answer? I am glad to help if you have any other questions.
Best Regards,
Daniel Zhang

0 Votes 0 ·

1 Answer

DanielZhang-MSFT avatar image
0 Votes"
DanielZhang-MSFT answered

Hi AndrewHsiao-6094,
From the following threads, you can know that Entity Framework doesn't support ODBC.
Why doesn't Entity Framework support ODBC?
Is there a way to use ODBC with EF?
And this document provides information on data providers that support the Entity Framework.
Best Regards,
Daniel Zhang


If the response is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.