OLE DB fun: Mute IErrorInfo and date-time parameter overflow. · Tue Sep 22, 06:58 PM

Here's some useful, hard-won info.

Scenario:

Course of action:

  1. The first things to look at are the status codes for each parameter (you _are_ using status codes, I hope!). If you see that one or more of the parameter status codes are DBSTATUS_E_UNAVAILABLE (i.e., "8"), that says that those particular parameters were not the cause of the error, and you can disregard those.
  2. Look for the parameters that have a _different_ error code. If you find a parameter that has a datetime type (DBTIMESTAMP on the OLE DB side, datetime on the SQL Server side, may not extend to other DBMSs), and it is marked DBSTATUS_E_DATAOVERFLOW, this means that the DBTIMESTAMP has a value that is not within the range of the datetime value, to wit: 1753 A.D. to 9999 A.D. So, for example, if you start out with an empty filetime, which has a range dating from 1601 A.D., and you stuff it into a DBTIMESTAMP value, you will end up with this overflow error.

-- David Pickett --

...