简体   繁体   English

在经典ASP中使用Excel ODBC驱动程序时出错

[英]Error using excel ODBC driver in classic asp

I am getting this error when I try to load an excel document as a datasource for my webpage 当我尝试将Excel文档作为网页的数据源加载时,出现此错误

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Excel Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xd5c Thread 0x7e4 DBC 0x19acf74 Excel'. 

What is going wrong? 怎么了?

I agree with Pbearne; 我同意Pbearne; the text of the message looks related to some internal aspect of the driver rather than the "real" reason for the problem. 消息的文本看起来与驱动程序的某些内部方面有关,而不是问题的“真正”原因。

As a first step use forward slashes in MapPath ie /Resources/uploads/filername.XLS 第一步,在MapPath中使用正斜杠,即/Resources/uploads/filername.XLS

Then verify path is correct. 然后确认路径正确。

Try the following to see if it points to the right file: 请尝试以下操作,看是否指向正确的文件:

Response.Write server.MapPath("/Resources/uploads/filername.XLS")

The Problem is most likly that the path the excel file is wrong the message is a red herning its nothing to do with the registry 问题最可能是excel文件路径错误消息是红色提示,它与注册表无关

You will have some a bit like this check the generated path is correct 您将像这样检查生成的路径是否正确

objConn.Open "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq="&server.MapPath("\Resources\uploads\filername.XLS")&";DefaultDir="&server.MapPath("\Resources\uploads\")

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

相关问题 使用Excel ODBC驱动程序进行字符串比较 - String comparison using Excel ODBC driver 通过带有 PHP 的 ODBC 驱动程序使用 Microsoft Excel - Using Microsoft Excel via an ODBC Driver with PHP ODBC Excel 驱动程序:来自外部数据库驱动程序的意外错误 - ODBC Excel Driver: Unexpected error from external database driver Microsoft ODBC Excel驱动程序 - Microsoft ODBC Excel Driver VBA,Excel ODBC驱动程序 - 使用带有来自单元格的参数的sql查询时键入不匹配错误 - VBA, Excel ODBC driver - Type Mismatch error while using sql query with parameter from cell 错误 [42000] [Microsoft][ODBC Excel 驱动程序] 语法错误(缺少运算符) - ERROR [42000] [Microsoft][ODBC Excel Driver] Syntax error (missing operator) 查询表达式中的Microsoft ODBC Excel驱动程序语法错误(缺少运算符) - Microsoft ODBC Excel Driver Syntax Error (missing operator) in query expression Excel ODBC SQL语句引发错误'[ODBC EXCEL驱动程序]数据类型不匹配 - Excel ODBC SQL Statement Throwing Error '[ODBC EXCEL Driver] Data Type Mismatch in criteria 使用VBScript使用ODBC驱动程序读取后关闭Excel文件 - Close excel file after reading with ODBC driver using VBScript 使用Simba ODBC驱动程序从Excel查询Couchbase视图 - Query Couchbase Views from Excel using Simba ODBC Driver
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM