OLE DB fun: Mute IErrorInfo and date-time parameter overflow. · Tue Sep 22, 06:58 PM
Here's some useful, hard-won info.
Scenario:
- You are using OLE DB.
- You are trying to call a stored procedure to which you provide more than one parameter.
- Your return code is
DB_E_ERRORSOCCURRED. - Consultation with IErrorInfo provides no additional information.
Course of action:
- 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.
- Look for the parameters that have a _different_ error code. If you find a parameter that has a datetime type (
DBTIMESTAMPon 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 --
...
The Top 10 List of Numbers. Srsly! Online dating: sample first contact letter (statistically AWESOME)
Archive by Date
Articles By Category:
- Administrative (51)
- Art (3)
- Books (14)
- Business (1)
- Clocks (8)
- Dating (1)
- Events (7)
- Flickr (1)
- Fonts (8)
- Human-Nature (1)
- Humor (5)
- Military (4)
- Misc (121)
- Movies (5)
- Music (68)
- OLE-DB (1)
- Poetry (4)
- Quotes (5)
- Relationships (1)
- Security (1)
- Shoes (2)
- Software (115)
- Spirits (11)
- Surveys (1)
- Tequila (6)
- Virtualization (9)
- Web (9)
- Website (20)
- Wood-Related (2)
- Writing (7)

