Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
I am reading records from a 2010 Excel spreadsheet via my web application using the following connection string on my developer machine which has Window 7 installed (32-bit):
...OleDbConnection conn = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath((string)this.ViewState["workfile"]) + ";Extended Properties=\"Excel 8.0;Xml;HDR=NO\"");
All the while, on my Server which has 32 bit Window Server 2008 Standard edition installed, I have to use this old connection string, provided that I have to convert my 2010 excel file to Excel 97- 2003 workbook.
....OleDbConnection conn = new OleDbConnection((string.Concat(new object[] { "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=", base.Server.MapPath((string)this.ViewState["workfile"]), ";Extended Properties=", '"', "Excel 8.0;HDR=NO", '"' })));
On the server I CANNOT READ ANY RECORD AT ALL. And when I used the newer connection string (the first one above) on the server, I am getting this error message:The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine
What am I doing wrong???
Posted 9-Jan-13 13:04pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Gus'O. at 10-Jan-13 8:59am
Is installing these components on the server safe?
PIEBALDconsult at 10-Jan-13 9:05am
You ask like you're a nazi dentist.
They're from Microsoft; of course they're safe. Or are they?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 449
1 Maciej Los 430
2 OriginalGriff 320
3 CHill60 240
4 CPallini 210
0 Sergey Alexandrovich Kryukov 10,102
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web01 | 2.8.150327.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100