Groups | Blog | Home
all groups > sql server dts > april 2007 >

sql server dts : exec sql task within a loop


madan
4/12/2007 7:35:19 PM
I have a package with 3 sql execution tasks and a active x script. The
first sql execution task has a rowset value as the output parameter
and in my activex script im trying to loop through the results and
execute the sql tasks 2 and 3 ... this is what im trying to
accomplish...

Dim oRS
Set oRS=DTSGlobalVariables("RS Table").Value
Do While oRS.EOF = False
dim variable
variable=oRS.fields(0).Value
DTSGlobalVariables("var1").Value=variable
Dim oPkg,oStep,oStep1
oPkg = DTSGlobalVariables.Parent
oStep=oPkg.Steps("DTSStep_DTSExecuteSQLTask_2").Execute
oStep1=oPkg.Steps("DTSStep_DTSExecuteSQLTask_3").Execute
oRS.MoveNext
Loop


Im would like to know why this does not work.... kindly help me out
with this...


thanks
madan
Allan Mitchell
4/14/2007 12:00:00 AM
Hello madan,


Have a look at this article for ideas

http://www.sqldts.com/298.aspx

--

Allan Mitchell
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

[quoted text, click to view]

madan
4/16/2007 7:32:15 AM
Thank You Allan


[quoted text, click to view]

AddThis Social Bookmark Button