I have a legacy VB6 application that uploads file attachments to a database BLOB field. It works fine unless a user has the file open.
I tried creating a copy of the file, then uploading that copy, but to my surprise, the FileCopy procedure gets a "permission denied" error whenever you try to copy a file that is open by the user.
This suprised me, because you can copy a file in Windows Explorer while it is open, and I was assuming that the FileCopy method used the same API call as explorer.
Anyway, my question is: How can I copy an open file in VB6?