Window Server标准版 [英] Window Server Standard Edition
问题描述
我正在使用安装了Window 7(32位)的开发者计算机上的以下连接字符串,通过我的Web应用程序从2010 Excel电子表格中读取记录:
... 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 \);
一直以来,在我的服务器上安装了32位Window Server 2008标准版,我必须使用这个旧的连接字符串,前提是我必须将我的2010 excel文件转换为Excel 97-2003工作簿。
.... 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,'''''}})));
在服务器上我根本无法读取任何记录。当我在服务器上使用较新的连接字符串(上面的第一个)时,我收到此错误消息: ''Microsoft.ACE.OLEDB .12.0''提供者未在本地机器上注册
我做错了什么???
你可能会安装ACE驱动程序。
http://www.microsoft.com/en-us/download/details.aspx?id=23734 [ ^ ]
http://www.microsoft.com/en-us/download/details.aspx?id=13255 一> [ ^ ]
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???
You could probably install the ACE drivers.
http://www.microsoft.com/en-us/download/details.aspx?id=23734[^]
http://www.microsoft.com/en-us/download/details.aspx?id=13255[^]
这篇关于Window Server标准版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!