Query Microsoft Access MDB Database using LINQ and C#

Matthew Ruston picture Matthew Ruston · Nov 17, 2008 · Viewed 93k times · Source

I have a *.MDB database file, and I am wondering if it is possible or recommended to work against it using LINQ in C#. I am also wondering what some simple examples would look like.

I don't know a lot about LINQ, but my requirements for this task are pretty simple (I believe). The user will be passing me a file path to Microsoft Access MDB database and I would like to use LINQ to add rows to one of the tables within the database.

Answer

FlySwat picture FlySwat · Nov 17, 2008

What you want is a LINQ to ODBC provider, or a LINQ to JET/OLEDB provider.

Out of the box, MS doesn't make one. There may be a 3rd party who does.