I have an SSIS 2008 package that reads data from an Access database (OLEDB data source) and uses it to update SQL Server tables.
When the updates are complete, I want the package to delete the Access database. I tried the file system task and the Script task, but it does not work because the package supports opening a database.
I get an error message:
The process cannot access the file 'C: ..... \ abc.mdb' because it is used by another process.
How can I get a package to release a database connection?
I tried calling the Dispose () method on the ConnectionManager, but to no avail. I noticed that the ConnectionManager class has a ReleaseConnection method , but I think this will release a new connection created using the corresponding AcquireConnection method . I need SSIS to release its own internal connection, so the MDB file can be deleted.
Any suggestions?
Thanks in advance.
source
share