First off, I basically know nothing about C# and .Net
In SSIS I select from Oracle into an Object variable using execute SQL task with ADO.Net connection.
I now need to put the results into SQL Server but can't do it per column as my query result has 60 columns. (My test worked but that was only for 5 columns).
The code I have thus far is:
What do I need to add/amend in the code for this to work. I know a sp would probably work better but given our go-live cycles and procedures, I don't have time for that route.
Thanx for the help.
In SSIS I select from Oracle into an Object variable using execute SQL task with ADO.Net connection.
I now need to put the results into SQL Server but can't do it per column as my query result has 60 columns. (My test worked but that was only for 5 columns).
The code I have thus far is:
Code:
DataSet set = new DataSet();
SqlConnection conn = new SqlConnection("Data Source=localhost;Initial Catalog=PRU_MIS_ODS;Integrated Security=SSPI;");
SqlDataAdapter adapt = new SqlDataAdapter("SELECT * FROM ADO_Test WHERE 1=0", conn);
SqlCommandBuilder cmd = new SqlCommandBuilder(adapt);
adapt.Fill(set, Dts.Variables["AdminResults"].Value.ToString());
adapt.Update(set, "Admin");
Thanx for the help.