[英]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.