TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
GOWTHAM RAMAMOORTHY
NA
10
414
Read an object variable having “FileInfo” object content.
May 22 2020 12:01 AM
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;
}
Reply
Answers (
6
)
Poll Serial Port with sequence of queries, manual commands
Input to Method instead of Console.writeline