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.
| 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 = nothingEnd Functionthen a datadump task runs ---also finethen 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_M5UpLoadMove3rdPartygoexec PS_M5UpLoadMoveCSgoexec PS_M5UpLoadMoveDupsgoexec PS_M5UpLoadMoveNoInfogoexec PS_FailedUpLoad_UpdateSourcegoexec PS_Yardcheck_InsertFromM5goexec PS_Yardcheck_Update_SourceAny thoughts?ThanksLaura |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-05-07 : 12:25:47
|
| >> pkg.steps("DTSStep_DTSDataPumpTask_1").executeSuspect 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. |
 |
|
|
lauramayer
Posting Yak Master
152 Posts |
Posted - 2004-05-10 : 11:45:51
|
| Brilliant!!! Thanks so much.Laura |
 |
|
|
|
|
|