Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 mysterious DTS package

Author  Topic 

lauramayer
Posting Yak Master

152 Posts

Posted - 2004-05-07 : 12:19:50
Good afternoon,

I have a DTS package that is acting strangely. When I run it together it acts wierd when I take it a piece at a time it runs fine and just the way I want it.

Heres what happens an activex script runs that finds the filename by the user typing it in:

Function Main()
Main = DTSTaskExecResult_Success

Dim fso: set fso = createobject("scripting.filesystemobject")

dim filename
filename = InputBox ("Enter Value" )
msgbox Filename

Dim folder: set folder = fso.getfolder(dtsglobalvariables("OrginPath").value)
Dim pkg

Set pkg = dtsglobalvariables.parent
Dim oConn

'For each file in files
'filename = file.name
DTSglobalvariables("filename").value = filename
set oconn = DTSglobalvariables.parent.connections("Download File")
oconn.datasource = dtsglobalvariables("OrginPath").value & filename & ".txt"

pkg.steps("DTSStep_DTSDataPumpTask_1").execute

Set oconn = nothing

End Function


then a datadump task runs ---also fine

then an execute SQL task runs and thats where things go wrong run by itself in ISQL it runs perfectly, running it in the package makes part of it, not all of it, run twice.

exec PS_M5UpLoadMove3rdParty
go
exec PS_M5UpLoadMoveCS
go
exec PS_M5UpLoadMoveDups
go
exec PS_M5UpLoadMoveNoInfo
go
exec PS_FailedUpLoad_UpdateSource
go
exec PS_Yardcheck_InsertFromM5
go
exec PS_Yardcheck_Update_Source


Any thoughts?

Thanks
Laura

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-07 : 12:25:47
>> pkg.steps("DTSStep_DTSDataPumpTask_1").execute
Suspect this is the cause - why not use the workflow to excute the step from the queue after the activex step?

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

lauramayer
Posting Yak Master

152 Posts

Posted - 2004-05-10 : 11:45:51
Brilliant!!! Thanks so much.

Laura
Go to Top of Page
   

- Advertisement -