Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends, I have a script in vb.net which gives sum of 2 variables. I need to convert it in C# for ssis script task. Below is the script:

********************************************************

VB
Public Sub Main() 
       MessageBox.Show("TotalCount" & Dts.Variables("TotalCount").Value.ToString()) Dts.Variables("TotalCount").Value = Convert.ToInt32(Dts.Variables("TotalCount").Value) + Convert.ToInt32(Dts.Variables("Insert_Count").Value) Dts.Variables("ErrorNewRowCount").Value = Convert.ToInt32(Dts.Variables("ErrorNewRowCount").Value) + Convert.ToInt32(Dts.Variables("Error_Count").Value) MessageBox.Show("TotalCountContainer" & Dts.Variables("TotalCountContainer").Value.ToString()) MessageBox.Show("TotalCount" & Dts.Variables("TotalCount").Value.ToString()) Dts.Variables("Insert_Count").Value = 0 MessageBox.Show("TotalCount : " & Dts.Variables("TotalCount").Value.ToString()) MessageBox.Show("ErrorNewRowCount : " & Dts.Variables("ErrorNewRowCount").Value.ToString())
         Dts.TaskResult = ScriptResults.Success
End Sub

*******************************************************************

Please help me out......Thanks in advance...
Posted
Updated 17-Mar-15 19:22pm
v2
Comments
[no name] 18-Mar-15 0:52am    
What is your question?
Sergey Alexandrovich Kryukov 18-Mar-15 0:54am    
There is not such thing as "C# script". What are you talking about?
—SA

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