I need an alternative solution to the following problem:
I have an Windows application that used by over 100 users on a LAN. Part of this application is used for searching and viewing product drawings. Details on the files along with the file location on the network are stored in SQL Server 2000 and the files are stored on a shared network drive. When the application opens up files, it...
- Deletes the file if it already exist on the local hard drive
- Copies the file from the server to the local hard drive
- Parses the file out to multiple files it it's a TIF that contains multiple frames. Saving each frame as an individual file on the local hard drive.
- Watermarks each image/frame depending on set rules. (Watermarks are text)
- Recombines all frames (if any) into one file and saves the file to a new location on the local hard drive.
- Deletes any parsed frames used during this operation
- Opens the file with the specified default view (they have a choice of custom or Windows default)
When the application closed, all files are deleted to make sure it's gets a proper clean up.
The problem is the image locks don't always release. I dispose of the locks right away, but still I think this much file activity is causing a problem. Any ideas on new solutions to complete the same outcome?
Maybe by using streams, but is it possible to do this with streams? If so, please add any code samples you can.
Thanks
Chris