如果启用32位设置为true,Microsoft Access数据库引擎2010年可再发行64位只适用 [英] Microsoft Access Database Engine 2010 Redistributable 64 bit only works if Enable 32-bit set to true
问题描述
我有我从Windows 2000迁移到Windows 2012服务器的ASP应用经典
I have an ASP classic application that I'm migrating from a Windows 2000 to Windows 2012 Server.
它使用以下code导入XLS文件
It uses the following code to import xls files
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "DRIVER={Microsoft Excel Driver (*.xls)}; IMEX=1; HDR=NO; Excel 8.0; DBQ=" & Server.MapPath("\Imports\") &"\"&fn& "; "
和CSV文件的
Set objConn = CreateObject("ADODB.Connection")
Set objRS = CreateObject("ADODB.Recordset")
objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strPathtoCSVFile & ";Extended Properties=""text;HDR=YES;FMT=Delimited"""
根据在这个问题上 Excel的ODBC和64位服务器的答案我下载并安装了 Microsoft Access数据库引擎2010可再发行
我都试过了32位及以上,但他们都没有工作的64位版本,除非我更改应用程序池设置为启用32位应用程序为True。如果设置为False,我得到下面的错误。
I've tried both the 32bit and the 64bit version of the above but neither of them work unless I change the application pool setting Enable 32-bit applications to True. If it is set to False I get the below error.
Microsoft OLE DB提供的ODBC驱动程序错误80004005
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[微软] [ODBC驱动程序管理器]数据源名称未找到和指定默认驱动程序
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
不幸的是设置它的真正休息的PDF渲染,该网站的其他部分。
Unfortunately setting it the True breaks PDF rendering in another part of that website.
,唯一可行的选择,我都拿出了到目前为止在它自己的应用程序池为32位。
The only viable option I have come up with so far is to set this part up under it's own application pool that is 32-bit.
我怎样才能运行这个64位的应用程序池?
How can I run this in 64-bit Application Pool?
编辑:有一个人用欺骗锤,不解决相关的问题走来面前的问题是
<一href=\"http://stackoverflow.com/questions/1811417/asp-running-in-64-bits-environment-with-access-database\">ASP在64位环境中的Access数据库运行
And before someone comes along with a dupe hammer, a related question that does not resolve the issue is ASP running in 64 bits environment with Access database
推荐答案
首先,确保你安装64位软件包的 AccessDatabaseEngine_x64.exe成功。
First, make sure you install the 64-bit package AccessDatabaseEngine_x64.exe successfully.
在此之后,使用下面的连接字符串。
您应该不会再有问题,你的64位应用程序池的工作。
After that, use the following connection strings.
You should no longer have problems working with your 64-bit application pool.
'Excel 97-2003
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Open _
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\my\path\to\tables.xls;Extended Properties=""Excel 8.0;HDR=NO;IMEX=1"";"
Set Recordset = Connection.Execute("Select * From [Sheet1$]")
'CSV / TXT
Connection.Open _
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\my\path\to\csv_dir\;Extended Properties=""text;HDR=YES;FMT=Delimited"";"
Set Recordset = Connection.Execute("Select * From table.csv")
connectionstrings.com 一直是连接字符串一个很好的参考。
connectionstrings.com has always been a good reference for connection strings.
这篇关于如果启用32位设置为true,Microsoft Access数据库引擎2010年可再发行64位只适用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!