FIX: Folder.Messages.Delete Hangs Visual Basic

ID: Q183247


The information in this article applies to:
  • Collaboration Data Objects (CDO), version 1.1


SYMPTOMS

A Microsoft Visual Basic application may hang during or after a call to the Delete method of a Folder's Messages Collection if the folder contains 100 or more messages.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Collaboration Data Objects version 1.2.


MORE INFORMATION

Steps to Reproduce Behavior

NOTE: The following code deletes all existing messages in your Inbox, creates 200 new messages in the Inbox, and then attempts to delete all messages.

   Set OFolder = OSession.Inbox
   OFolder.Messages.Delete
   Subject = "Message"
   Text = "Body for test message "

   For i = 1 To 200
      Subject = Subject & str(i)
      Text = Text & Subject
      Set OMsg = OFolder.Messages.Add(Subject:=Subject, Text:=Text)
      OMsg.Update
      Set OMsg = nothing
   Next i

   ' During or soon after the following call, Visual Basic hangs.
   OFolder.Messages.Delete        ' < -- Hangs here 


REFERENCES

For additional information about Collaboration Data Objects versus Active Messaging, please see the following article in the Microsoft Knowledge Base:

Q176916 INFO: Active Messaging and Collaboration Data Objects (CDO)

Additional query words: ActMsg

Keywords : kbCDO kbCDO110bug kbCDO120fix kbMsg
Version : WINDOWS:1.1
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: November 9, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.