I'm trying to loop and read an object variable(as shown in the pic) where it has the file details(name/size/datemodified) from a share point location. (The varible is passed from an SSIS -Sharepoint task to SCript Task)
I found that an object cannot be used in a foreach enumerator, and i'm not sure how to proceed with this one. Any help is much appreciated.
- using System;
- using System.Data;
- using Microsoft.SqlServer.Dts.Runtime;
- using System.Windows.Forms;
- using System.Data.OleDb;
- public void Main()
- {
-
- String Filename = "";
- Var fileinfo = Dts.Variables["User::DvarObj"].Value;
-
- foreach(var i in fileinfo)
- {
- Filename = i.Name;
- MessageBox.Show(Filename);
- }
-
- Dts.TaskResult = (int)ScriptResults.Success;
- }