If you use drive M to change Exchange 2000 Server data, you may cause database corruption. Therefore, Microsoft does not support using drive M in custom code, or using drive M to access data through file APIs.
Using Drive M in a Custom Code
- Unsupported example (using drive M to open Inbox):
Dim cn as ADODB.Connection
Dim strPath as String
' Using the drive M
strPath= "M:\Server\MBX\user\Inbox"
cn.Provider = "ExOLEDB.DataSource"
cn.Open strPath
- Supported example (using a file:// type URL):
Dim cn as ADODB.Connection
Dim strPath as String
' Using a file:// type URL
strPath= "file://./backofficestorage/Domain/Server/MBX/user/Inbox"
cn.Provider = "ExOLEDB.DataSource"
cn.Open strPath
Using File://BackOfficeStorage with a Windows API
- Unsupported example (using File I/O through Scripting.FileSystemObject to copy a message):
Dim fso As Scripting.FileSystemObject
Dim strSourceFile as String
Dim strNewFile as String
strSourceFile = "file://./backofficestorage/Domain/Server/MBX/user/Inbox/Test.eml"
strNewFile = "file://./backofficestorage/Domain/Server/MBX/user/Inbox/TestCopy.eml"
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile strSourceFile, strNewFile
- Supported example (using Microsoft Collaboration Data Objects (CDO) for Exchange 2000 Server):
Dim iMsg as New CDO.Message
Dim strSourceFile as String
Dim strNewFile as String
strSourceFile = "file://./backofficestorage/Domain/Server/MBX/user/Inbox/Test.eml"
strNewFile = "file://./backofficestorage/Domain/Server/MBX/user/Inbox/TestCopy.eml"
iMsg.DataSource.Open strSourceFile
iMsg.DataSource.SaveTo strNewFile