views:

283

answers:

3

I am getting this error when I try to load an excel document as a datasource for 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?

A: 

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\")
Pbearne
I am marking as the answer as I am provide a reference for the bug/error
Pbearne
A: 

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.

danseagrave
Yes upgrade the the new driver is a better call
Pbearne
A: 

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")
Sergey Kornilov
yes: good spot the slashes in mapPath should be /
Pbearne