views:

37

answers:

1

No error message available, result code: E_UNEXPECTED(0x8000FFFF).

I couldn't find any solutions through google. Encountered this while parsing an excel file. Does anyone know why this even occurs? It would be fine and all if it allowed me to recover from the error, but it even goes through the try catch and finally clause and renders my program useless!

Here's a more detailed question I asked yesterday that's related:

http://stackoverflow.com/questions/3225873/oledb-object-invalid-or-no-longer-set

+2  A: 

E_UNEXPECTED is usually returned on catastrophic failures. It means "I can't say what went wrong, but something is definitely wrong and I don't think you can do anything about it. Abort the program and get over it". Most of the time it is returned when some invariant is broken because of a bug or a failure to recognize defective input data (or parameters) lead to a corruption of internal data. Lazy programmers however return it when they don't feel like digging up a useful error value and simply return the most serious message available.

If the library you are using is usually supposed to work, then you should double check if you are using it the correct way.

Luther Blissett
That explains why there weren't a lot of helpful solutions over the internet. This one's with OleDb in particular though so I expected a bit more people encountering it.
Jonn