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 |
|
Zathras
Starting Member
28 Posts |
Posted - 2004-06-16 : 19:42:00
|
I am try to get my DTS package to execute the final data transfer if either of the 2 paths are executed, either:1. The MDB file exists, so delete the old data and transfer the dataor2. The MDB does not exist, so create it, create the tables, then transfer the dataI've done some research on how to do this (since by default all procedence steps must be completed for a task to execute), and some websites said to add in a dynamic update task to set the OTHER precedence step of the transform data task to a value of 4 for completed.Well I've done that, and it still doesn't work. If the diagram below takes Path 1 (or Path 2), then the transform data task never executes.How do you do this? I'm sure I could re-tool this so that everything is done inside the VBScript with a LOT of ADO statements, but I really want to learn how to create a more complex DTS package. Below if a picture of my DTS package right now.Thanks,Mike |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2004-06-17 : 04:56:12
|
| Whgat's behind your Path1 and Path2 commands??? |
 |
|
|
Zathras
Starting Member
28 Posts |
Posted - 2004-06-17 : 09:21:25
|
| Rick, thanks for your reply, here are my Dynamic Property changes:Path1:DTSStep_DTSDataPumpTask_1- Precedence Constraints-- 2--- Value = 4 (Constant)Path2:DTSStep_DTSDataPumpTask_1- Precedence Constraints-- 1--- Value = 4 (Constant)I have quadruple checked the Procedence Constraint #s, and I am certain that #1 corosponds to Path1 and #2 corosponds to Path2. |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-06-17 : 09:49:55
|
| You workflow says that both path2 and path1 have to complete for the transformation to start.There are a few ways of doing what you want.Disconnect the transformation and leave it disabled. On completion of either path enable the transformation and queue it.In your activex task set the source of the sql statement to either delete or create so there is only one path. Leave the package as it is. Change all workflows to "on success", move the create mdb task to part of path2, add a task to check for the existence of the mdb. This task activates one of the two paths but changing the precedence constraints. Have a look on www.sqldts.com - ther's almost certainly an example (in fact http://www.sqldts.com/default.aspx?218).Have all the tasks in sequence but skip tasks depending on the existence of the mdb http://www.sqldts.com/default.aspx?214.Set a global variable for the mdb exists. In the create tasks check the global variable and do nothing if it is set.==========================================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. |
 |
|
|
Zathras
Starting Member
28 Posts |
Posted - 2004-06-17 : 10:49:28
|
| Excellent nr! Thanks a lot! |
 |
|
|
|
|
|
|
|