Read object variable in script task


hi all,

       have executesqltask result set stored in object variable called varrec. next in foreach loop container using enumerator foreach ado enumerator , have selected varrec object variable in ado object source variable. have selected varrow object variable in variable mappings map each row in variable each loop.  inside foreach loop container have script task following,

1. read row object variable (varrow), , store each column value in string

2. connect sql server - completed

3. select rows table, insert rows in table

can 1 tell me how should achieve this. in advance.

 

some how know how connect sql server. please see below declaration , assignment

source : http://msdn.microsoft.com/en-us/library/ms136018.aspx#y570

  dim myadonetconnection sqlclient.sqlconnection
        myadonetconnection = directcast(dts.connections("test").acquireconnection(dts.transaction), sqlclient.sqlconnection)


sarvan

why did mapped each row object type variable again?!

you should have multiple variables instead of 1 varrow object type, multiple variables based on columns in data stream stored in varrec object variable, , should have appropriate type corresponding columns in data stream,

then can map each variable appropriate column index in variable mappings tab of foreach loop editor,

and can use execute sql task or script task or other task need variables.


http://www.rad.pasfu.com


SQL Server  >  SQL Server Integration Services



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........