Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
FIX: The xp_readmail and xp_findnextmsg Extended Stored Procedures Do Not Read Mail in Time Received Order
Article ID: 331968 - View products that this article applies to.
This article was previously published under Q331968
BUG #: 362609 (SHILOH_BUGS)
With SQL Server 2000, the xp_readmail and the xp_findnextmsg extended stored procedures get the first mail in the Inbox, the last one received.
With SQL Server 7.0, xp_readmail and xp_findnextmsg get the mail in the order of time received.
Service pack informationTo resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/290211/ )How to obtain the latest SQL Server 2000 service pack
Hotfix informationThe English version of this fix should have the following file attributes or later:
Version File name -------------------------- 8.00.695 Sqlmap70.dll
NOTE: Because of file dependencies, the most recent hotfix or feature that contains the files may also contain additional files.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.This problem was first corrected in Microsoft SQL Server 2000 Service Pack 4.
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/256986/EN-US/ )Description of the Microsoft Windows Registry
WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
To control the order SQL Mail reads MAPI information after you apply this hotfix, you must first add the following registry key value:
SortMailBoxByAscendingDate DWORD(assume default value of 0)
After you set SortMailBoxByAscendingDate equal to 1 (SortMailBoxByAscendingDate = 1) in the registry, xp_findnextmsg and xp_readmail will display the MAPI information in the order of sender submitted date and time.
Here are some examples.
For a default instance the entry is:
HKLM\Software\Microsoft\MSSQLSERVER\MSSQLSERVER\SortMailBoxByAscendingDateFor a named instance the entry is:
HKLM\Software\Microsoft\Microsoft SQL Server\InstanceName\MSSQLSERVER\SortMailBoxByAscendingDateIf the registry key value does not exist, SQL Mail reads the last message received first.
After you add the new registry value, you must restart SQL Mail.
Article ID: 331968 - Last Review: November 2, 2007 - Revision: 5.3