Rob N.
I am attempting to do a VB6 App that will upload a file using SSH FTP. This is on a Windows 7, 32-Bit machine, running VB6 sp6, and the SmartFTP 2.0 Type Library. I'm new when it comes to coding FTP processes, so a little green. I am using the code sample for VB6 to create a simple app that will test the feasibility of what I'd like to do. When I step through the code the connection method (objSSH.Connect) errors with a LastError value of 25. Is there any type of documentation which details what these codes mean? When I attempt to set the LogFile property in code I get the "Object doesn't support this property or method" error. My code is below:
Public objSSH As sfFTPLib.SSHConnection
Public objSFTP As sfFTPLib.SFTPConnection
Public objGlobal As sfFTPLib.Global
Set objGlobal = CreateObject("sfFTPLib.Global")
Dim strKey As String
'strKey = strKey & "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10)
'strKey = strKey & "<License>" & Chr(13) & Chr(10)
'strKey = strKey & "<Version>2.0</Version>" & Chr(13) & Chr(10)
'strKey = strKey & "<Id>400012345</Id>" & Chr(13) & Chr(10)
'strKey = strKey & "<Name>Robert Nash</Name>" & Chr(13) & Chr(10)
'strKey = strKey & "<Email>******@****.com</Email>" & Chr(13) & Chr(10)
'strKey = strKey & "<Company"
Set objSSH = CreateObject("sfFTPLib.SSHConnection")
objSSH.Host = "elink-sshftp.*******.com"
objSSH.Port = 22
objSSH.Username = "MFRI-----"
objSSH.Password = "*******"
objSSH.UseMessageLoop = True
'objSSH.LogFile = "<FileName.log"
'If objSSH.Connect = ftpErrorSuccess Then
If objSSH.Connect = ftpErrorSuccess Then
SFTPTest
objSSH.Disconnect
Else
MsgBox ("Connect() failed.")
End If
Along these lines, does anyone know of a good resource with sample VB6 code for programmatically doing uploads and downloads?
Any help is appreciated, thank you
Public objSSH As sfFTPLib.SSHConnection
Public objSFTP As sfFTPLib.SFTPConnection
Public objGlobal As sfFTPLib.Global
Set objGlobal = CreateObject("sfFTPLib.Global")
Dim strKey As String
'strKey = strKey & "<?xml version=""1.0"" ?>" & Chr(13) & Chr(10)
'strKey = strKey & "<License>" & Chr(13) & Chr(10)
'strKey = strKey & "<Version>2.0</Version>" & Chr(13) & Chr(10)
'strKey = strKey & "<Id>400012345</Id>" & Chr(13) & Chr(10)
'strKey = strKey & "<Name>Robert Nash</Name>" & Chr(13) & Chr(10)
'strKey = strKey & "<Email>******@****.com</Email>" & Chr(13) & Chr(10)
'strKey = strKey & "<Company"
Set objSSH = CreateObject("sfFTPLib.SSHConnection")
objSSH.Host = "elink-sshftp.*******.com"
objSSH.Port = 22
objSSH.Username = "MFRI-----"
objSSH.Password = "*******"
objSSH.UseMessageLoop = True
'objSSH.LogFile = "<FileName.log"
'If objSSH.Connect = ftpErrorSuccess Then
If objSSH.Connect = ftpErrorSuccess Then
SFTPTest
objSSH.Disconnect
Else
MsgBox ("Connect() failed.")
End If
Along these lines, does anyone know of a good resource with sample VB6 code for programmatically doing uploads and downloads?
Any help is appreciated, thank you