Re: error calling external object function putfile - WeOnlyDo Discussion board

Re: error calling external object function putfile (General questions)

by sureshsundar, Friday, March 13, 2009, 16:13 (5532 days ago) @ woddrazen

Drazen:
The protocol is 1 sftp. I exactly followed the code you have sent, but powerbuilder thinks connect without parenthesis as property and error out.
The code segment
ole_wodftp.object.Hostname = 11.22.122.133
ole_wodftp.object.port =1100
ole_wodftp.object.Login = xxxxxxxx
ole_wodftp.object.Password = xxxxxxxxxxxx
ole_wodftp.object.Protocol = 1
ole_wodftp.object.Blocking = 1
ole_wodftp.object.Connect

Error is:
Error:Error accessing external property Connect

If you have the code and a sample app can you please email me, prior to that make sure sftp protocol works in the sample.
Thanks,
Suresh

Hi,

Sorry for slower reply I have just finished testing in PB 10.

Here is code I use and it worked for me without any problem:
[code]ole_1.object.Hostname = hostname
ole_1.object.Login = login
ole_1.object.Password = password
ole_1.object.Blocking = 1
ole_1.object.Connect

ole_1.object.PutFile( c:\test.txt , /home/weonlydo/test_pb.txt )[/code]
Can you try my code? What happened if you remove PutFile line? Did you still receive error?

Which protocol you need to us for your server?

More help about protocol you can find here in Protocol Property:
http://www.weonlydo.com/FtpDLX/Help/wodFtpDLXLib~wodFtpDLX~Protocol.html


Drazen

[img]http://[/img] [img]http://[/img] [img]http://[/img] [img]http://[/img]


Complete thread: