![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
If I am executing a Data Driven Query within DTS, how can I determine the number of rows returned by the SQL query for the source? Somehow, I need to retrieve this value into a variable within the ActiveX script for the row transformation. What I am hoping to do is execute a function within the script whenever the last row in the recordset is reached. If someone can provide an example, I would GREATLY appreciate it. -Bill |
#3
| |||
| |||
|
|
You can't do this within the same task, as it does not now it has reached the end, until it already has. Best bet would be to run a separate query before hand, SELECT COUNT(*) ... and store the number in a global variable. You will also need to use another global variable as a current row counter, and check the two in the ActX script. Or Could you not move the functionality out to a following task. You can then use a simple row counter or the RowComplete property to get the number of rows processed by the DDQ. -- Darren Green http://www.sqldts.com "Bill" <WBeatty (AT) Prodigy (DOT) Net> wrote in message news:%23Ej4OCOjDHA.724 (AT) tk2msftngp13 (DOT) phx.gbl... If I am executing a Data Driven Query within DTS, how can I determine the number of rows returned by the SQL query for the source? Somehow, I need to retrieve this value into a variable within the ActiveX script for the row transformation. What I am hoping to do is execute a function within the script whenever the last row in the recordset is reached. If someone can provide an example, I would GREATLY appreciate it. -Bill |
![]() |
| Thread Tools | |
| Display Modes | |
| |