BUG: Error When You Use Client Cursor to Add Record to SQL Server Table That Has Default Value in Datetime Field (279888)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
- ActiveX Data Objects (ADO) 2.0
- ActiveX Data Objects (ADO) 2.1 SP2
- ActiveX Data Objects (ADO) 2.5
- ActiveX Data Objects (ADO) 2.6
- ActiveX Data Objects (ADO) 2.7
This article was previously published under Q279888 SYMPTOMS If you use ADO to insert a new record through a client-side
recordset into a SQL Server table that has a non-nullable datetime field with a
default value, you receive the following error message if you do not supply a
value for the datetime field: Run-time error
'-2147217887 (80040e21)': Multiple-step operation generated errors. Check each
status value. This error occurs whether you use the OLE DB Provider
for SQL Server or the OLE DB Provider for ODBC Drivers. The error message may
differ when you use Microsoft Data Access Components (MDAC) version 2.5 Service
Pack 1 (SP1) or earlier. This error does not occur with a server-side cursor.
CAUSE This error occurs in the Client Cursor Engine when it
attempts to convert the value of type DBTYPE_DBTIMESTAMP to DBTYPE_VARIANT.
RESOLUTION There are several ways to work around this problem:
- Use a server-side cursor for the recordset.
- Remove the default value that is specified for the field in
the database.
- Always specify a value for the field when you add a new
record.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbbug kbDatabase kbpending KB279888 |
---|
|