| 
                
Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with. 
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | rockstar283Yak Posting Veteran
 
 
                                        96 Posts | 
                                            
                                            |  Posted - 2013-11-15 : 13:14:28 
 |  
                                            | I am using PragmaticWorks TaskFactory's SFTP task in SSIS to get a list of all the files on SFTP server in an object variable. I am trying to see the received list in a script task using C#'s messagebox with the following code:??System.Data.OleDb.OleDbDataAdapter A = new System.Data.OleDb.OleDbDataAdapter();            System.Data.DataTable dt = new System.Data.DataTable();            MessageBox.Show("hi");            A.Fill(dt, Dts.Variables["FileList"].Value);            MessageBox.Show(dt.Rows.Count.ToString());                       foreach (DataRow row in dt.Rows)            {                                string Name;                object[] array = row.ItemArray;                               Name = array[0].ToString();                                MessageBox.Show("File Name= "                    + Name);	}I have imported oledb library as well..but when I run the package I am getting a big ass exception at lineA.Fill(dt, Dts.Variables["FileList"].Value);I am saying that because, before the exception, 'HI' message is getting displayed in a messagebox.Can anyone please help me out here..Thanks a lot in advance. |  |  
                                    | rockstar283Yak Posting Veteran
 
 
                                    96 Posts | 
                                        
                                          |  Posted - 2013-11-15 : 13:17:17 
 |  
                                          | Edit. Here is the exception:   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript() |  
                                          |  |  |  
                                    | visakh16Very Important crosS Applying yaK Herder
 
 
                                    52326 Posts |  |  
                                |  |  |  |  |  |