Can an FTP Connection be created using code, if so what should the connectionstring be?

  • Can I create an FTP connection using code if yes what should the connection string be?  The reason being the file name of the file that is being received via ftp is being changed each month and I need to be able to look at the calendar cycle in a table here in SQL Server and then get the file that has that calendar cycle in its name.

    Please let me know if I can open an FTP connection and look for the file rather than hard code the filename in the FTP Task Editor.

    Thanks,

    Monisha

  • Try this, it should give you what you need....

    http://www.sqldts.com/default.aspx?302

     

  • Thanks this works.

     

  • Monisha,

    This question was posed on a SSIS forum yet the article you were directed to was related to DTS so it seems strange that it would work for you.

    Are you using SSIS or DTS?

    -Jamie

     

  • Jamie,

    I looked at the article briefly and since it provided the capability to provide the ftp server name, user and password I was under the impression that it would work.  To be frank I did not get a chance to try it yet.  I saw one of your posting elsewhere the method to determine the connection string for OLEDB and Flat file but that does not work for FTP.

    I am using SSIS.  Any input on setting up an ftp task using code will be much appreciated.

    Thanks,

    Monisha

     

  • The method of dynamically setting things like this are through the use of property expressions. There's lots of stuff on my blog about at if you're interested or just reply here with any questions.

    -Jamie

     

  • I am fairly new to using SSIS and have not found the usage of properties on in your blogs.  May be I missed it.  Any inputs or a pointer in the right direction will be much appreciated.

     

    Thanks,

    Monisha

  • Expressions are the key thing here. If you select any container (containers include tasks by the way) in the control-flow you can press F4 and in the resultant properties pane you'll see a section called "Expressions". This allows you to dynamically set the value of any property of the container.

    You can also do the same thing with variables and that is a fantastically powerful feature.

    -Jamie

     

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply