connection problems with ActiveX demo - WeOnlyDo Discussion board

connection problems with ActiveX demo (wodFtpDLX / wodFtpDLX.NET)

by Patrick Rock, Tuesday, July 11, 2006, 22:47 (6470 days ago)

I downloaded the FtpDLX demo version and have been trying to connect to the server where I plan to do most of my secure server downloads, but .Connect is returning a null value.

I am running in VFP 9. I had expected that a failure to connect with the server would return 0 (zero), but it is not. Is the null a normal return value? I've checked the username and password, so I'm trying to figure how to make it work before spending the boss' money.

Please help.


TIA

Re: connection problems with ActiveX demo

by wodDrazen, Tuesday, July 11, 2006, 23:01 (6470 days ago) @ Patrick Rock

Hi Patrick,


After you import wodFtpDLX ActiveX control in VFP you can add this code to connect:
-----------------------------
thisform.sftp.HostName= 'your_hostname'
thisform.sftp.Login='your_login'
thisform.sftp.Password='your_password'
thisform.sftp.Connect()
-----------------------------

You mention that you get 0 value, from where?
If you are referring to ErrorCode in for example Connected Event that this mean that you don't have error and successfully connect to your server.


Hope I helped.


Regards,
Drazen

Re: connection problems with ActiveX demo

by wodSupport, Tuesday, July 11, 2006, 23:04 (6470 days ago) @ wodDrazen

Patrick,

try to set Blocking property to True value - this could be important.

Kreso

Re: connection problems with ActiveX demo

by Patrick Rock, Tuesday, July 11, 2006, 23:14 (6470 days ago) @ wodSupport

Here is my code:

ObjFTPSSH=Createobject( WeOnlyDo.wodFtpDLXCom.1 )
ObjFTPSSH.HostName = pc_host
ObjFTPSSH.Login = pc_usr
ObjFTPSSH.Password = pc_pwd
ObjFTPSSH.Port = 22
ObjFTPSSH.Blocking = .T.
ObjFTPSSH.Protocol = 1
ObjFTPSSH.Timeout = 60
pn_connect = ObjFTPSSH.Connect()
pc_lstdir = ObjFTPSSH.ListDir( / )
ObjFTPSSH.Disconnect

The values for pn_connect and pc_lstdir both return .Null. I expected that the first would return a numeric value and the second a string (even an empty string) value.

I have checked my host name, user name, and password, but I'm getting nothing at the moment.

You mention that you get 0 value, from where?
If you are referring to ErrorCode in for example
Connected Event that this mean that you don't
have error and successfully connect to your server.

As I said, I was expecting a 0 value from .Connect() if the connection had failed, but not a Null value.

Re: connection problems with ActiveX demo

by wodDrazen, Tuesday, July 11, 2006, 23:43 (6470 days ago) @ Patrick Rock

Patrick,


Here is example how you need to use wodFtpDLX to get content of files and folders from server :

-----------------------------------------
dlx1=CREATEOBJECT('WeOnlyDo.wodFtpDLXCom.1')

dlx1.HostName = 'your_hostname'
dlx1.Protocol = 1
dlx1.Port = 22
dlx1.Login = 'your_login'
dlx1.Password = 'your_password'
dlx1.Blocking = .t.
dlx1.Timeout = 60
dlx1.Connect()

dlx1.ListDir ('/home/something')

For i = 0 To dlx1.DirItems.Count - 1
? (dlx1.DirItems.Item(i).Name)
Next i
-----------------------------------------

Hope this helps


Regards,
Drazen

Re: connection problems with ActiveX demo

by Patrick Rock, Wednesday, July 12, 2006, 18:00 (6470 days ago) @ wodDrazen

Drazen,

Thank you. That helped.

I am using the demo, and will now recommend it to the company (and have them spend the money).