Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File in use by another process

Status
Not open for further replies.

SQLScholar

Programmer
Aug 21, 2002
2,127
GB
Hey all,

I have a for each file loop in SSIS.

After its gone through its stuff with each file, i want it to delete the file. However its saying that the file is in use by another process.

Any ideas? Is it because the loop is still running and its still on that file in the loop?

How do i get round it?

Dan

----------------------------------------

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
I have some more info that seems to be pertinant.

Inside the loop for each file - i also have a loop to find each sheet inside the spready. Its Foreach ADO.NET Schema Rowset Enumerator based on the excel spreadsheet.

This seems to be whats not closing.

Hmmmmmm......

any ideas?

TIA

Dan

----------------------------------------

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Aha - if anyone has this problem use a vbscript to connect to the excel file and find the sheets. That way you can close JET properly and all is well.

Dan

----------------------------------------

Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind - Dr. Seuss

Computer Science is no more about computers than astronomy is about telescopes - EW Dijkstra
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top