Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Wish to transfer data from a C# data table stored as a variable to a table in SQL Server using a SSIS package. My query is,

How to pull data from the variable into SQL Server using SSIS, what components to use for the same
Posted
Comments
bbirajdar 23-Apr-13 7:33am    
Are you sure about this sentence ? ---- "C# data table stored as a variable to a table in SQL Server" ???

I dont think it is possible to store a datatable into SQL server table
PuneetDBA 24-Apr-13 4:50am    
That's possible...
AmitGajjar 25-Apr-13 8:11am    
Why don't you directly store data in database using insert query ?

1 solution

Hi,

Here i found couple of links that may help you,

Passing DataSet to the SSIS Package[^]

So your code would be like,
C#
Variables variables = package.Variables;
variables["MySSISVariable"].Value = myDataSet;

I have not tired yet but it looks promising.

Best Luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900