0

I am wondering that how to drag tables in Access 2010 to a dmbl file so that I can utilize the advantages of LINQ2SQL in my code.

There is a error message when I was trying to drag a table in Access 2010 to the DBML file. It was : The selected object uses provider which is not supported.

So.... do you have any ideas?

I'm waiting for your answers....

Best regards,

Franva
  • 6,565
  • 23
  • 79
  • 144

2 Answers2

2

Linq to SQL is just that, a Linq provider for SQL Server. It does not support Access databases. Check out this question for more details. It looks like you might be able to use Entity Framework for Access though.

Community
  • 1
  • 1
Eric Andres
  • 3,417
  • 2
  • 24
  • 40
  • Actually according to "David" on one of the answers in your link, he claims to have it working, albeit using quite a hack. Although what's being asked is a hack in general so.... http://stackoverflow.com/a/1603229/82729 – Tom Halladay May 11 '12 at 15:14
  • Interesting idea. I can't imagine that it's worth going to the trouble just to use Linq to SQL over EF. Seems like you would be constantly trying to get it the way you work, instead of letting it work the way it's supposed to. There are also SQL differences between Access and SQL Server that might cause some grief as well. – Eric Andres May 11 '12 at 15:17
  • Yeah, i'm not supporting the idea in general. Personally I think it's time for your client or company to pony up for a proper SQL Server instance, or switch to Azure – Tom Halladay May 11 '12 at 15:21
  • Definitely. Kind of sad that there are so many VB6 + Access apps still out there in the wild. I worked for a company that was in transition, and there was kicking and screaming the whole way, from clients and execs. – Eric Andres May 11 '12 at 16:19
0

Check Jon Skeet words on LINQ asp.net page against MS Access .

I don't think LINQ to SQL supports Access. However, if your table is sufficiently small to fit into memory, LINQ to DataSet will let you query datatables etc pretty easily - especially strongly typed datasets.

LINQ to SQL only works for SQL Server databases. What you need is the Microsoft Entity Framework. This makes object oriented access to your mdb. From this you can run LINQ queries.

Community
  • 1
  • 1
Niranjan Singh
  • 18,017
  • 2
  • 42
  • 75