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.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Access object variable inside the script task

Author  Topic 

on7june
Starting Member

41 Posts

Posted - 2010-05-07 : 02:53:48
I have set the Result set as "Full result set" in Execute SQL task. The output will be two records with one column. I have stored this result set in variable of type "Object". I need to use the rows stored in this variable inside the script task. How to achieve this.

Sarvan

apodemus
Starting Member

30 Posts

Posted - 2010-05-07 : 03:08:23
You can use ForEach Loop Container, choose Foreach ADO Enumerator as Enumerator in Collection, now you can get yor variable in ADO object source variable. Next you have to map some other variable (variable with type you have in result set column) with results you get from object (Index is the number of column from result set starting with 0).

Inside foreach loop container you can use new variable.

apodemus
Go to Top of Page
   

- Advertisement -