Deleting Items
Deleting Items
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
To delete an item from a folder, use the Record.DeleteRecord method. If you delete a folder item, all items within the folder are also deleted.
VBScript
Dim Rec Dim Conn Dim Info Dim InfoNT Dim sUrl Set Info = CreateObject("ADSystemInfo") Set InfoNT = CreateObject("WinNTSystemInfo") sUrl = "http://" & InfoNT.Computername & "." & Info.DomainDNSName & "/public/test_folder2/test1.txt" Set Conn = CreateObject("ADODB.Connection") Conn.Provider = "ExOLEDB.DataSource" Conn.Open sUrl Set Rec = CreateObject("ADODB.Record") Rec.Open sURL, Conn, adModeReadWrite Rec.DeleteRecord ' Clean up. Rec.Close Conn.Close
Visual Basic
' Reference to Microsoft ActiveX Data Objects 2.5 Library ' Reference to Microsoft CDO for Exchange 2000 Library Dim Rec As New ADODB.Record Dim Conn as New ADODB.Connection Dim sUrl as String sUrl = "https://server/public/test_folder2/test1.txt" Conn.Provider = "ExOLEDB.DataSource" Conn.Open sURL Rec.Open sURL, Conn, adModeReadWrite Rec.DeleteRecord ' Clean up. Conn.Close Rec.Close Set Conn = Nothing Set Rec = Nothing
Related Topics
- Deleting Items Using a Recordset
- Deleting Items (WebDAV)
- Deleting Items in the Mailbox Using ADO
- Deleting Objects Using ADO
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.