I have a package which connects to SourceDB1 and execute an update statement that updates DestDB2. Now I have many such source DB and destination DB which has the similar structure. For this I have for each loop container within which the execute SQL task is placed. Now, since the sourceDB connection varies , I have created a variable named SourceConnString. Likewise, the update query is also within a variable named UpdateVariable. I created UpdateVariable because source and destination are two different databases.
Now I need to save the number of records that are updated in the execute sql task each time. The records count should be inserted into a table or flat file whichever is easy.
I saw tutorials how to do this without using an update through variable. Is there any way we could return the count of rows in my situation.
You can use ExecValueVariable property, in Execute SQL Task it stores number of records affected by SQL command. You have to specify variable name at ExecValueVariable property or pick it up from drop-down as shown below.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With