Toad for Data Analysis is putting a lock on its output files. How can the lock be cleared on the output files?
The following error is generated:
Object SQL Query finished with error: The process cannot access the file F:\USERS\IS\ISSHARE\ISOPEN\Quest Test\Analytic Scripts\CRS AGING REPORT.xls because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
at FlexCel.XlsAdapter.XlsFile.Save(String fileName, TFileFormats fileFormat, Char delimiter)
at FlexCel.Core.ExcelFile.Save(String fileName)
at Quest.Toad.ImportExport.WriterExcel.WriteFooter(Object tableObject)
Export Finished [10/4/2007 11:33:02 AM]
It appears that Toad for Data Analysis is using Excel as a comm object and it is not releasing the open file.
This only occurs when using the test feature of Toad.
Scheduling the job to run this lock does not occur.
Make a copy of the Excel output file and re-associate the SQL output to the new copy.
Continue to run the script multiple times even with an email.
Do not attach the output as an attachment to avoid problems.
Issue fixed in version 1.1. The latest version of Toad Data Point (formally known as Toad for Data Analysis) can be downloaded here.