![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
check option "execute package in main thread" and "close connection on completion" ----- Dorsa wrote: ----- I have read some other articles regardimg this problem but still I could not fix the problem. My DTS package has 5 different Steps which is at first step I have a ActiveXScript ruuning. It takes an excel file (testfile.xls) in the server, copies that file to another folder with Today's Date. Then Renames it to "test.xls" . Then in Step2 I have a connection that take that excel file "test.xls" and Imports it to database. at the last step I have another ActiveXScript which I need to delete that file "test.xls" . When it gets to the step5: I get the permission Denied. I think the file is still open! (not sure) But when I run it seperatly it runs successfully. I have tried to check the workflow/Close the connection when compleption. ( not sure in which connection I should do that but I think I have tried it for all Steps) Could you give me solution for that. Thanks Here is my Script '************************************************* ********************* ' Visual Basic ActiveX Script '************************************************* *********************** Function Main() Dim TemplateDest Dim EmailfileDest Dim today today = Year(Date) & "-" & Right("0" & Month(Date), 2) & "-" & Right("0" & Day(Date), 2) Set fso1 = CreateObject("Scripting.FileSystemObject") fso1.copyfile TemplateDest, EmailfileDest & today + "-" & "EventDelinquenciesConflictsReport" & ".xls" fso1. DeleteFile ("somewhere..\Reporting\Delinquency Reports\AutomateDaily\EventNotification.xls") Main = DTSTaskExecResult_Success End Function |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |