OLE DB fun · Fri Oct 31, 04:58 AM

So, here’s some useful, hard-won info:
If you are trying to call a stored proc, and you provide a bunch of parameters, and your return code is DB_E_ERRORSOCCURRED with no additional info via IErrorInfo, the first thing you should check is the status codes for each parameter (you are using status codes, I hope).
If you then see that many of the parameters are status code DBSTATUS_E_UNAVAILABLE (= 8), that is merely a sign that those particular parameters were not the cause of the error, and you can disregard those. Look for the parameter(s) 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 or may not extend to other DBs), 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 --

...