Monday, March 26, 2012

Foreach ADO Enumerator?

my setting in foreach component like below shown

Enumerator: Foreach ADO Enumerator

ADO Object source variable: user::strsql

strsql like "select distinct name from table"

Enumeration mode: Rows in the first table

my goal: transform data according to the distinct every name

however execute error

prompt: Variable "User::strsql" does not contain a valid data object

pls help,thanks in advance

The foreach ADO Enum, needs and OBJECT type.

You need to create a Execute SQL Task with the SQL you want, then asign the return to the object variable. Then use the object as the ADO Object.

See this example: http://blogs.conchango.com/jamiethomson/archive/2005/07/04/1748.aspx

No comments:

Post a Comment