This article was previously published under Q331965
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 362696(SHILOH_BUGS)
When you save an attachment by using the xp_readmail extended stored procedure in SQL Server 2000, if the attachment already exists in the temp folder, SQL Server overwrites the existing file.
With SQL Server 7.0, SQL Server renames the new file with a numeric suffix.
Service pack information
To 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:
290211 How to obtain the latest SQL Server 2000 service pack
The 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:
256986 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 if SQL Mail overwrites existing attachment files after you apply this hotfix, you must first add the following registry key value:
(assume default value of 1)
When you set OverwriteExistingAttachmentFiles equal to 0 (OverwriteExistingAttachmentFiles = 0) in the registry, attachment files cannot be overwritten. The OverwriteExistingAttachmentFiles key presents the file sequence as Sample.txt, Sample.txt1, Sample.txt2 and so on.
Microsoft SQL Server 2000 Developer Edition, Microsoft SQL Server 2000 Standard Edition, Microsoft SQL Server 2000 Enterprise Edition, Microsoft SQL Server 2000 Personal Edition, Microsoft SQL Server 2000, Workgroup Edition, Microsoft SQL Server 2000 Desktop Engine (Windows), Microsoft SQL Server 2000 Enterprise Edition 64-bit