Answered by:
Problem with Access db connectionstring on DataContext class

Question
-
Hi!
code below throws an ArgumentException with message: "Keyword not supported: 'provider'."
string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=D:\\people.accdb"; // DataContext db = new DataContext(connectionString); Table<Users> users = db.GetTable<Users>(); var UsersQuery = from p in users select p; foreach (var person in UsersQuery) Console.WriteLine("FIRSTNAME: {0} LASTNAME: {1}", person.FIRSTNAME, person.LASTNAME); //
What should i do to fix this?
Tuesday, March 26, 2013 12:40 PM
Answers
-
I don't think you can use the EntityFramework against MS Access without some 3rd party tools.
Bob - www.crowcoder.com
- Proposed as answer by JayChase Tuesday, March 26, 2013 12:48 PM
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:15 PM
Tuesday, March 26, 2013 12:46 PM -
Hi,
Maybe these other threads could be helpful you:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/044bb47d-2209-4f78-a445-a1e67015c703/
http://stackoverflow.com/questions/295772/query-microsoft-access-mdb-database-using-linq-and-c-sharp
Regards.
Please remember to Vote & "Mark As Answer" if this post is helpful to you.
Por favor, recuerda Votar y "Marcar como respuesta" si la solución de esta pregunta te ha sido útil.- Edited by JA Reyes Tuesday, March 26, 2013 12:53 PM
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:16 PM
Tuesday, March 26, 2013 12:49 PM -
SQL CE 4.0 works well though if moving away from Access is an option.
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:16 PM
Tuesday, March 26, 2013 12:50 PM
All replies
-
I don't think you can use the EntityFramework against MS Access without some 3rd party tools.
Bob - www.crowcoder.com
- Proposed as answer by JayChase Tuesday, March 26, 2013 12:48 PM
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:15 PM
Tuesday, March 26, 2013 12:46 PM -
Hi,
Maybe these other threads could be helpful you:
http://social.msdn.microsoft.com/Forums/en-US/netfxbcl/thread/044bb47d-2209-4f78-a445-a1e67015c703/
http://stackoverflow.com/questions/295772/query-microsoft-access-mdb-database-using-linq-and-c-sharp
Regards.
Please remember to Vote & "Mark As Answer" if this post is helpful to you.
Por favor, recuerda Votar y "Marcar como respuesta" si la solución de esta pregunta te ha sido útil.- Edited by JA Reyes Tuesday, March 26, 2013 12:53 PM
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:16 PM
Tuesday, March 26, 2013 12:49 PM -
SQL CE 4.0 works well though if moving away from Access is an option.
- Marked as answer by SISCO_RedOne Tuesday, March 26, 2013 1:16 PM
Tuesday, March 26, 2013 12:50 PM -
I think you should take a look at this:
http://csharp.net-informations.com/data-providers/csharp-oledbdataadapter.htm
This is great for all thing pertaining to connectionstrings:
http://www.connectionstrings.com/
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.
Thursday, March 28, 2013 4:16 AM