dbTalk Databases Forums  

Looping through recordset

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Looping through recordset in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Andy C
 
Posts: n/a

Default Looping through recordset - 08-05-2004 , 08:15 AM






Hi,

I have an SQL Execute task that returns a recordset. What I want to do is use this recordset to start a workflow of several objects for each row that is returned.

I have an ActiveX script reading the recordset with no problems as I'm passing it as a global parameter, but how do I set up the workflow for the following:

SQL produces recordset(OK)->ActiveX to read recordset(OK)->ActiveX script for each row returned -> SQL for each row....etc

I've looked at the various looping examples, but they don't seem to show how to do this.

Thanks,

Andy C

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Looping through recordset - 08-05-2004 , 09:23 AM






Here is an example you shoudl be able to work with-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)


--
Darren Green
http://www.sqldts.com

"Andy C" <AndyC (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi,

I have an SQL Execute task that returns a recordset. What I want to do is
use this recordset to start a workflow of several objects for each row that
is returned.
Quote:
I have an ActiveX script reading the recordset with no problems as I'm
passing it as a global parameter, but how do I set up the workflow for the
following:
Quote:
SQL produces recordset(OK)->ActiveX to read recordset(OK)->ActiveX script
for each row returned -> SQL for each row....etc

I've looked at the various looping examples, but they don't seem to show
how to do this.

Thanks,

Andy C



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Looping through recordset - 08-06-2004 , 02:15 AM



Andy,

just expand the package by adding tasks between the start and end of the
loop. In the sample add tasks between the BuildMsgBoxString task and
DisplayMsgBox task. The workflow scripts for each of those tasks are the
important part, not the contents, so if you understand the process properly
you could replace them entirely.


--
Darren Green
http://www.sqldts.com

"Andy C" <AndyC (AT) discussions (DOT) microsoft.com> wrote

Quote:
Darren,

Thanks - that's fine and I'd got that far, but what I was trying to do was
call another ActiveX task for every iteration of the loop, without spawning
to another DTS package.
Quote:
Do you know if this is possible?

Thanks,

Andy C

"Darren Green" wrote:

Here is an example you shoudl be able to work with-

How to loop through a global variable Rowset
(http://www.sqldts.com/default.aspx?298)


--
Darren Green
http://www.sqldts.com

"Andy C" <AndyC (AT) discussions (DOT) microsoft.com> wrote in message
news:BECA2873-0FDA-4D39-A3A7-BDDE71E7C2C9 (AT) microsoft (DOT) com...
Hi,

I have an SQL Execute task that returns a recordset. What I want to do
is
use this recordset to start a workflow of several objects for each row
that
is returned.

I have an ActiveX script reading the recordset with no problems as I'm
passing it as a global parameter, but how do I set up the workflow for
the
following:

SQL produces recordset(OK)->ActiveX to read recordset(OK)->ActiveX
script
for each row returned -> SQL for each row....etc

I've looked at the various looping examples, but they don't seem to
show
how to do this.

Thanks,

Andy C






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.