SFTP File Info Task not working

80 views
Skip to first unread message

Lee Becker

unread,
Feb 11, 2016, 11:05:19 AM2/11/16
to COZYROC
I am trying to use the FileInfo Task posted on Cozy Roc, but am having a problem getting it to run.  Visual Studio is not able to reference the Microsoft DTS Runtime 1.0 reference library.  Is there someplace I can download the dll from?

Ivan Peev

unread,
Feb 11, 2016, 11:52:02 AM2/11/16
to COZYROC
Hi Lee,

What is the exact error message you are getting ?

Lee Becker

unread,
Feb 11, 2016, 12:04:07 PM2/11/16
to COZYROC
DTS is not declared.  It may be inaccessible due to its protection level is the error it is showing when you hover over the Dts in my ScriptMain.vb.

In my properties though under my References though it shows that the Microsoft DTS Runtime 1.0 path <The system cannot find the reference specified>

Ivan Peev

unread,
Feb 12, 2016, 7:13:09 AM2/12/16
to COZYROC
Lee,

Which version of SQL Server do you use? And which version of the reusable script did you download?

Lee Becker

unread,
Feb 12, 2016, 8:53:04 AM2/12/16
to COZYROC
SSMS 2012 and the 2012 version of the task I thought, but let me verify.

Lee Becker

unread,
Feb 12, 2016, 10:13:30 AM2/12/16
to COZYROC
We figured out what we were doing wrong Ivan, but now are coming up with the problem.  The variable of the remote file that we are feeding in to the task is an variable of object type.  We are calling it "RemoteFile" (object) just like in the SampleSftpIteration.dtsx

When I run the package it get's the RemoteFilesList and passes it to the ForEachLoop mapped to RemoteFile whcih passes to the ScriptTaskPlus and then fails with this error.

[File Info List] Error: Unable to cast object of type 'FileInfo' to type 'System.Object[]'.

Ivan Peev

unread,
Feb 12, 2016, 12:35:44 PM2/12/16
to COZYROC
Lee,

You are not using the script correctly. You have to pass the list itself as parameter to the script, not the individual item. Review the script and the documentation page again.

Lee Becker

unread,
Feb 12, 2016, 2:10:10 PM2/12/16
to COZYROC
Thanks Ivan!

I have pointed the RemoteFileList directly to the task and it is now functioning properly (Not crashing).  

Now how do I access the information after the Script Task has completed so I can push to DB so that I can collect/compare with internal data of previous file downloaded?

Is there a ResultSet variable that I can use to push in to SQL?

Ivan Peev

unread,
Feb 12, 2016, 4:57:42 PM2/12/16
to COZYROC
Lee,

The variable you provide as input for the list is the same variable used to store the result list after the script processes it with the specified action.

Lee Becker

unread,
Feb 15, 2016, 1:11:57 PM2/15/16
to COZYROC
Okay.  Now when I try to retrieve the data from the object to put in my DB using my C# script task I am getting the following error "Object is not an ADODB.RecordSet or an ADODB.Record."

I was originally getting this error before I began using the "Info list task".  I was thinking that this task would make the data accessible, but I guess all it is doing is putting it in an ascending order.  

What do I need to use in order to retrieve this data and put it in to our DB's?  Please break it down for me.

Ivan Peev

unread,
Feb 15, 2016, 6:36:41 PM2/15/16
to COZYROC
Lee,

How would you rate your programming skills from 1-10 ?
Reply all
Reply to author
Forward
0 new messages