XADM: MDAC 2.6 Breaks ADO MoveNext() Function with Exchange 2000 (273791)
The information in this article applies to:
- Microsoft Exchange 2000 Server
- Microsoft SQL Server 2000 (all editions)
- Microsoft Data Access Components 2.6
This article was previously published under Q273791 SYMPTOMS
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.
DB_E_BADBOOKMARK
CAUSE
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.
RESOLUTIONTo 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:
300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack
WORKAROUND
Use the more specific Move() method in a recordset as a workaround to avoid this problem:
rs.Move 1, 0
-or-
rs.Move 1, adBookmarkCurrent STATUSMicrosoft 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.MORE INFORMATION
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.
Modification Type: | Major | Last Reviewed: | 4/7/2006 |
---|
Keywords: | kbQFE KBHotfixServer kbbug kberrmsg kbfix kbMDAC260sp1Fix KB273791 |
---|
|