Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

C# Script Task - MessageBox Variables

$
0
0

I dont know C#, so I thought I would start simple and try to do message box a variable. I am struggling even with that.

 

In VB.net I would print a value of the variable in a message box using the following syntax.

 

                Msgbox(dts.variables(“VariableName”).value.tostring)

 

In C#

                MessageBox.Show(Dts.Variables

 

At the point of selecting variables it is giving me this message.

                Error      1              Non-invocable member 'Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTAProxy.ScriptObjectModel.Variables' cannot be used like a method.         

 

I have following using statements defined. Do I need more?

                using System;

using System.Data;

using Microsoft.SqlServer.Dts.Runtime.VSTAProxy;

using System.Windows.Forms;

using Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTAProxy;


I might be missing something. Can anyone help?

 

Thanks

Sutha


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>