How can I store dataset object into a package variable of data type Object
and assigning it back to another Dataset object from within a script task?
相关问题
- SQL Server Import Wizard doesn't support impor
- Bulk insert from excel to sql for selective fields
- What other dependencies do I need to install in Vi
- Deployed SSIS Package not reflecting changes made
- Building SSIS solution using visual studio online
相关文章
- SSIS solution on GIT?
- How can I manually fail a package in Integration S
- See complete tooltip error message for Data Flow S
- Save content of Email body in outlook to a file
- What is Big Data & What classifies as Big data? [c
- What is the actual use of buffer temp and blob tem
- Object Variable in script tasks
- SSIS Script Task Not Running Excel Macro With AddI
Here is a code example from a previous answer of mine. It shows how, in a script task, you can fill an OleDB Data Adapter from an Object Variable. You can store recordsets into object variables by using the recordset destination in a dataflow task.
How to access a Recordset Variable inside a Script Task
To further extend what I did in the script from my other answer, if you have manipulated the rows in your object variable and want to save the new results into the object variable for further processing, you can do the following near the end of your process.
Dts.Variables("rsRecipients").Value = dt
An example of this is located at: Update SSIS Object Variable Used In Foreach Conainer From Script Task
Code from example #2:
End Sub
The line
olead.Fill(dt, Dts.Variables("rsRecipients").Value)
reads in from a recordset variable. The lineDts.Variables("rsRecipients").Value = dt
writes the dataset back out to a variable (in this case the same one, however you could write it to a different variable if you wanted to). The other ways to load a dataset into a object variable include using the recordset destination in a dataflow task, or using a sql task and setting the full resultset to a variable by choosing full result set on the result set field in the dialog, then setting the output to go to a variable of type object.