Jump to content


Photo

FTP Library Troubles


  • Please log in to reply
2 replies to this topic

#1 djrud

djrud
  • Members
  • 6 posts

Posted 03 April 2005 - 01:31 AM

Hi,

When I load the sample VB.NET project for smartFTP FTP library in VB.NET 2005 Beta and try to run it, I get an InvalidCastException on:

objFTP = CreateObject("sfFTPLib.FTPConnection")

When I try to code the same in my own test project it says 'Declaration Expected' on that same line.

Anybody know what might be wrong?

Thx...
djrud


>>>>
Part of Code
>>>>

Option Explicit On
Imports sfFTPLib

Module test

Dim objFTP As sfFTPLib.FTPConnectionClass
objFTP = CreateObject("sfFTPLib.FTPConnection")

objFTP.Host = "ftp.test.com"
....

#2 djrud

djrud
  • Members
  • 6 posts

Posted 13 April 2005 - 07:52 AM

Hi,

My solution of this problem was a different way of declaring in VB.NET. I used:

Dim objFTP As sfFTPLib.FTPConnectionClass
objFTP = New sfFTPLib.FTPConnection

instead of:

Dim objFTP As sfFTPLib.FTPConnectionClass
objFTP = CreateObject("sfFTPLib.FTPConnection")

Greetz,
djrud

#3 mb

mb

    Developer

  • Administrators
  • 11528 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 13 May 2005 - 11:49 AM

Thank you for your input.

It has been updated in the VB.NET sample.

-Mat




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users