BUG: UpdateBatch Generates SQL Statement That Cannot Reuse SQL Server Query Plans (305387)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.1
- ActiveX Data Objects (ADO) 2.1 SP1
- 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
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 (GA)
- Microsoft Data Access Components 2.1 SP1
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.5 SP1
- Microsoft Data Access Components 2.5 SP2
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.6 SP1
- Microsoft Data Access Components 2.7
- Microsoft SQL Server 7.0
- Microsoft SQL Server 7.0 Service Pack 1
- Microsoft SQL Server 7.0 Service Pack 2
- Microsoft SQL Server 7.0 Service Pack 3
- Microsoft SQL Server 2000 (all editions) SP1
This article was previously published under Q305387 SYMPTOMS The OLE DB Provider for SQL Server generates sp_executesql statements when it runs the UpdateBatch method of an ADO Recordset object to run batch updates. However, the generated sp_executesql statements may not be able to reuse SQL Server query plans when
you use the ADO Recordset to insert or modify records with varchar or nvarchar columns. CAUSE This problem occurs because the parameterized queries
(which are generated to run the data modification operations) use the number of
characters in the corresponding field values instead of the column size (which
the underlying metadata defines) to specify the size of the varchar and nvarchar fields. 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: | 6/28/2004 |
---|
Keywords: | kbbug kbpending KB305387 |
---|
|