Click here to Skip to main content
Rate this: bad
good
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
Gus'O.581

1 solution

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

Solution 1

  Permalink  
Comments
Gus'O. at 10-Jan-13 8:59am
   
Thanks...PIEBALconsult,
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)



Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
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