简体   繁体   English

经典的ASP访问数据库在Windows Server 2012上不起作用

[英]classic asp access DB not working on windows server 2012

Hi I tried to migrate my application, classic asp and access db from windows 7 professional to windows server 2012. 嗨,我尝试将我的应用程序,经典ASP和从Windows 7 Professional的访问数据库迁移到Windows Server 2012。

For standard script without accessing access db, it's working fine. 对于不访问access db的标准脚本,它可以正常工作。 But I got error when the script use access db, by the following: 但是当脚本通过以下方式使用access db时出现错误:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' Microsoft OLE DB提供程序的ODBC驱动程序错误'80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /includes/public.asp, line 64 [Microsoft] [ODBC驱动程序管理器]找不到数据源名称,也未指定默认驱动程序/includes/public.asp,第64行

Here is my connection string 这是我的连接字符串

strConn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.mappath("../private/apps.MDB")

In application pool, I've set 在应用程序池中,我已经设置

.NET Framework Version = No Managed Code 
Enable32Bit Application = True 
ManagedPipelineMode = Classic

Could anyone help, in which area should i look into? 谁能帮忙,我应该在哪个领域进行调查?

Appreciate for the help. 感谢您的帮助。

The "Microsoft Access Driver" is the desktop driver installed when Office Access or the Office Access Redistributable is installed, it is not intended for use in server-side applications . “ Microsoft Access驱动程序”是在安装Office Access或Office Access Redistributable时安装的桌面驱动程序, 不适用于服务器端应用程序 The current Access driver is also known as ACE (Access Connectivity Engine) and replaces the JET engine for single-user desktop applications only . 当前的Access驱动程序也称为ACE(访问连接引擎), 仅用于单用户桌面应用程序替代JET引擎。

Instead, please use the JET 4.0 OLEDB or ODBC driver (ODBC is preferred). 相反,请使用JET 4.0 OLEDB或ODBC驱动程序(首选ODBC)。 This driver is included in MDAC which comes with Windows Server out-of-the-box. 该驱动程序包含在Windows Server随附的MDAC中。 The connection string template is this: 连接字符串模板是这样的:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\somepath\myDb.mdb;

OR 要么

Provider=Microsoft.Jet.ODBC.4.0;Data Source=c:\somepath\myDb.mdb;

Note that the JET 4.0 driver is only available in 32-bit mode (but you've already set your application-pool to 32-bit so this won't be an issue). 请注意,JET 4.0驱动程序仅在32位模式下可用(但是您已经将应用程序池设置为32位,因此这不会成为问题)。

Note that JET is effectively obsolete at this point (its successor, ACE, is only intended for use in single-user desktop applications) as evidenced by its availability only in 32-bit versions. 请注意,JET在这一点上实际上已经过时了(它的后继者ACE仅用于单用户桌面应用程序),仅在32位版本中就可以证明这一点。 Server-side and multi-user applications should use SQL Server (SQL Server now supports "LocalDb"-mode which introduces a simpler working experience, similar to Access, and it's available in Express Edition). 服务器端和多用户应用程序应使用SQL Server(SQL Server现在支持“ LocalDb”模式,该模式引入了更简单的工作体验,类似于Access,并且在Express Edition中可用)。 If you absolutely need something simple and low-resource I would suggest SQLite, however you will be responsible for using the SQLite API correctly in a multithreaded/concurrent environment like a webserver (including Classic ASP). 如果您绝对需要简单且资源少的东西,我建议您使用SQLite,但是您将负责在多线程/并发环境(例如Web服务器)(包括Classic ASP)中正确使用SQLite API。

Update: 更新:

I'll revise my answer to warn that using LocalDb with ASP.NET, or server applications in general, is inadvisable - and of little point, actually - if you're using LocalDb then you already have SQL Server installed, and if you already have SQL Server installed then you might as well use it in "normal mode" rather than LocalDb mode. 我将修改答案以警告不建议将LocalDb与ASP.NET或一般的服务器应用程序一起使用-实际上,一点意义不大-如果您使用的是LocalDb,则您已经安装了SQL Server,并且如果已经如果安装了SQL Server,则最好在“普通模式”下使用它,而不要在LocalDb模式下使用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过Server 2012中的ASP Classic / SQL Server链接服务器访问MS Access数据库时出现问题 - Issue accessing MS Access database via ASP Classic / SQL Server linked server in Server 2012 经典ASP和Access DB-FROM子句错误 - Classic ASP & Access DB - FROM Clause Error Access DB PDO在Windows Server x64版本中不起作用 - Access DB PDO not working in Windows Server x64 edition Windows 10 / IIS / Classic ASP上的Access 2016中的日期格式还原 - Date formatting reverting in Access 2016 on Windows 10/IIS/Classic ASP 在 Windows server 2008 R2 64bit & IIS7.5 上运行经典的 asp & ms access 2000 - Running classic asp & ms access 2000 on Windows server 2008 R2 64bit & IIS7.5 与经典ASP一样,在C#(ASP.MVC)中将Access DB(.mdb)与ADODB一起使用 - Using Access DB (.mdb) with ADODB in C# (ASP.MVC) like with Classic ASP 将旧ASP网站连接到服务器2012上的Access(.mdb) - Connecting Old ASP site to Access (.mdb) on server 2012 经典ASP发布到MS Access DB-在Textarea编辑器中不起作用 - Classic ASP Post to MS Access DB - Doesen't Work from Textarea Editor Server2008R2上的经典ASP + MS Access(IIS 7) - 读取但无法写入 - Classic ASP + MS Access on Server2008R2 (IIS 7) - read but can't write 带有MS Access DELETE的经典ASP循环失败 - Classic ASP with MS Access DELETE fails in loop
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM