Re: Reading an Excel file using Jet.Oledb.4.0




<mifaina@xxxxxxxxx> wrote in message
news:95642d93-9439-4471-a54f-4cee80872948@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ralph:
Just wonder if you have any knowledge of the difference between
Jet.OLEDB.4.0 and Microsoft.ACE.OLEDB.12.0 regarding the errors codes.
I am trying to figure out a way to deal with various OLEDB errors and
there is a difference in the error code and message between these 2
providers. Any chance that you might have an idea where to get a list
of error codes? Thanks!

This is one for the " ... and I bet you thought you asked a simple question"
department.

Start here:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q168354&GSSNB=1

There are various HRESULT lists published here and there, at various sites
and within various documentation, and I could post a few URLs. But HRESULTS
and what they really mean for any particular product are like trying to find
the actual cost of a new car - only the dealer and god know for sure, or in
this case only god and perhaps a few developers.

For a "full" list you need to look at the various header files provided to
support COM (OLE is MS's implementation of COM). WinError.h, atldbcli.h,
etc., these headers are supplied with VC++ and a several SDK kits, because
that is where the original developer of a particular tool got them from.

[Note: These headers are copyrighted and seldom published.]

But that doesn't mean they will apply to all tools, or to all possible
scenarios. Consider that while using ADO and a Provider looks like a simple
client server call ...
Your Code -> ADO -> OLEDB Provider -> Database Engine
There is actually 8 to 12 steps, or layers, between here and there. At each
layer a component or routine may encounter an error - it has then two
choices (more perhaps, but to keep it simple ...); Stop what he's doing and
pass the error on or translate that error into something within the context
of what he was doing and pass on the new error. Keeping a consistent list of
ErrorCodes for a single project with mutliple developers is an
administrative problem. Keeping a consistent list over multiple projects is
even harder. Keeping a consistent list with mulitple projects that can be
used in multiple ways is an administrative nightmare.

That's why for apparently identical products - errors are often different.
(Also if you examine the "official" declarations for HRESULTS you'll
discover that many could easily be swapped - yet describe the same error.)

In practical use having a "full" list is NOT that helpful. I suggest the
following:
1) Consult the documentation
if still no go then ...
2) Use the published list MS (assuming your product is MS) provided above
if still no go then ...
3) Google for the error in MSDN, then the Web
if still no go then ...
4) Look up the error in one of headers and apply your Sherlock Holmes skills

There are several reasons for that order.

First off don't be surprised if a tool reports a particular error for a
specific condition, yet when you look up the "official" HRESULT in the COM
headers - it appears to be a bit of a stretch to apply that code.

Second, 90% of HRESULTS will the be common COM/OLE errors. Such a list is
readily available. Another 9% are COM/OLE errors but with slightly different
meanings within the context of a particular tool. They will only be
described in the product documentatin, if anywhere. And the last 1% are
often not even discovered until the tool has been out for awhile. (Pure
guessestimation on the statistics of course. lol)

hth
-ralph







.



Relevant Pages

  • Re: Outlook 2003 email listing ALL previous posts on topic, etc.
    ... plus every earlier one sent by that sender. ... lists the address of every email on topic that preceeded the one received, plus every earlier sent by that sender." ... So are you talking about the original message getting quoted by the first respondent that forwarded or replied, and then that 2nd message again getting quoted by the next person that forwarded or replied, and so on which leaves a series of indented e-mails when each person quoted the content of the e-mail that they got along the entire chain of recipients? ... that quoted content with a subset of the headers for that original message, like From, To, Cc, Subject, and Date. ...
    (microsoft.public.outlook)
  • Re: Dreadfully plonking Wifi question
    ... that may not be obvious after redirection (mailing lists, for example), ... so I look at that as well as some other headers. ... The sed expression might not be ideal either, ... subset of legal email address characters. ...
    (uk.comp.sys.mac)
  • Re: UGH, TOO MUCH SPAM
    ... There are some things in the XOVER headers (From:, Subject:, References:, ... rr.com has no reliable controls on their server, ... network is where you can find Eleventy-Zillion windoze boxes waiting to ... be zombied (if they aren't already on 'Open Proxy" lists). ...
    (comp.os.linux.misc)
  • Re: Match (merge) components from 2 spreadsheets
    ... Copy the 2 lists into column A of this new sheet ... (Don't include the headers when you copy--just the raw data) ... a roy january ...
    (microsoft.public.excel.misc)
  • Re: Bogus reply-to
    ... is all of these discussion lists have differnt ... > Either way, the headers don't work. ... mail client authors/vendors simply choose not to support them. ...
    (Debian-User)

Loading