Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XADM: MDAC 2.6 Breaks ADO MoveNext() Function with Exchange 2000


View products that this article applies to.

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

↑ Back to the top


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.

↑ Back to the top


Resolution

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:
300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack

↑ Back to the top


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

↑ Back to the top


Status

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.

↑ Back to the top


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.

↑ Back to the top


Keywords: KB273791, kbmdac260sp1fix, kbfix, kberrmsg, kbbug, kbhotfixserver, kbqfe

↑ Back to the top

Article Info
Article ID : 273791
Revision : 7
Created on : 2/27/2007
Published on : 2/27/2007
Exists online : False
Views : 429