This problem occurs because the ADO Stream
LoadFromFile method does not use the correct attributes to open the file.
When the BizTalk
File Receive function opens the file, it
uses the following attributes:
- FILE_SHARE_READ|FILE_SHARE_DELETE
- GENERIC_WRITE
When the ADO Stream
LoadFromFile method tries to open the file, it uses the following
attributes:
- FILE_SHARE_READ
- GENERIC_READ
The ADO Stream
LoadFromFile method cannot open a file that has been opened previously by using the attributes that BizTalk used to open the file. The file must be opened by using the following
attributes:
- GENERIC_READ
- FILE_SHARE_READ|FILE_SHARE_WRITE