Saturday, 14 September 2013

No solution for

No solution for

The following code continues to give the error:
*The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local
machine.*
The code below:
var excel = new ExcelQueryFactory("~/App_Data/uploads/" +
tempName);
var usersForImport = from c in excel.Worksheet<User>()
select c;
int count = usersForImport.Count();
for (int i = 0; i < count; i++)
{
User user = new User();
user = usersForImport.Skip(i).First();
db.Users.Add(user);
db.SaveChanges();
}
I have tried 2 solutions from previous posts, as I thought this problem
was identical, but they do not solve the problem. These are to either
install the Microsoft Access Database Engine or set the target platform
for x86.
The code relies on 'linqtoexcel' package.
Has anyone else run into these problems? Any solutions?

No comments:

Post a Comment