Article ID: 273791 - View products that this article applies to.
This article was previously published under Q273791
If Exchange 2000 and SQL Server 2000 are installed on the same computer, you receive the following error message when you attempt to use the RecordSet->MoveNext() function within ActiveX Data Objects (ADO) code .
The error consistently occurs when the data is requested from an Exchange 2000 server that is using the Exchange OLEDB Provider to retrieve the data.
Exchange 2000 currently supports MDAC 2.5 Service Pack 1 (SP1), the version provided with Windows 2000 SP1. SQL 2000 Server includes an updated version of MDAC, version 2.6. This newer version contains a performance optimization that incorrectly manages certain fixed-size bookmarks that are used for location and iteration of data in ADO recordsets.
To resolve this problem, obtain the latest service pack for Microsoft Data Access Components 2.6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/300635/EN-US/ )INFO: How to Obtain the Latest MDAC 2.6 Service Pack
Use the more specific Move() method in a recordset as a workaround to avoid this problem:
rs.Move 1, 0
rs.Move 1, adBookmarkCurrent
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000 and Microsoft Data Access Components 2.6.
This problem was first corrected in Microsoft Data Access Components 2.6 Service Pack 1.
Depending on the size of the bookmark, the Bookmark column is bound as DBTYPE_I4 (for 4-byte bookmarks), DBTYPE_I8 (for 8-byte bookmarks), or DBTYPE_BYTES | DBTYPE_BYREF for all other cases. EXOLEDB bookmarks are always fixed length of 8 bytes long. This problem specifically affects OLEDB providers that require fixed-sized bookmarks.
In MDAC 2.6, these bookmarks are stored in a subsequent numeric format that is incompatible with treating the bytes as unique tokens rather than as a numeric value. The result is often that the bookmarks are in fact truncated to a smaller number of bytes, and therefore, no match is found when providing the bookmark to the Exchange OLEDB Provider on subsequent iterations. This invalid bookmark is then passed to the IRowset->GetRowsAt() function, and the OLEDB error is returned from ADO.
Article ID: 273791 - Last Review: February 27, 2007 - Revision: 4.3