开发者

Error using excel ODBC driver in classic asp

I am getting this error when I try to load an excel document as a datasource f开发者_运维知识库or my webpage

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; the text of the message looks related to some internal aspect of the driver rather than the "real" reason for the problem.

  • my first guess would be permissions
  • I'd also suggest using the newer Jet OLE BE provider (http://www.carlprothman.net/Default.aspx?tabid=87#OLEDBProviderForMicrosoftJetExcel) rather than the Excel ODBC driver


As a first step use forward slashes in MapPath i.e. /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

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\")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜