How to transfer with MSINET to/from ftp server ?

bdunbdun Member Posts: 9
Hi all,

have someone an example on how to make a file transfer (up or download) to/from an ftp site, using the standard ocx MSINET ?
I just want to make a little form in Navision 4.0 to transfer files to and from an ftp site ...

Thanks in advance !

Comments

  • nunomaianunomaia Member Posts: 1,153
    CREATE(autFTP);
    autFTP.Protocol = icFTP;
    autFTP.RemoteHost = [server hostname];
    autFTP.UserName = [User Name];
    autFTP.Password = [Password];
    autFTP.Execute("Get " + [RemoteFileName] + " " + [LocalFileName]);
    

    Nuno Maia
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • bdunbdun Member Posts: 9
    Thanks a lot, nunomaia !

    But can you tell me what's the value of the variable icFTP ?

    Thanks in advance !
  • nunomaianunomaia Member Posts: 1,153
    0 - Unknown.
    1 - Default protocol.
    2 - FTP. File Transfer Protocol.
    3 - Reserved for future use.
    4 - HTTP. HyperText Transfer Protocol.
    5 - Secure HTTP.
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • bdunbdun Member Posts: 9
    Thanks nunomaia !

    I'm looking for the right automation to define the variable autFTP
    Don't find it

    Can you tell me what for automation you are using ???

    Sorry for my immense unknowledge ... !
  • jhoekjhoek Member Posts: 216
    Seems to be "Microsoft Internet Transfer Control 6.0 (SP6)"?!
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • jhoekjhoek Member Posts: 216
    I think the OCX is installed with Microsoft Visual Basic 5.0 and 6.0. From what I've seen, it works like a charm.

    Tip: From my personal experience, I can tell you that you sometimes need to add a SLEEP statement to your code, to make sure the Internet Transfer Control can finish its work before it goes out of scope and is destroyed.

    Tip: You can also use the StillProcessing property to test whether the transfer is complete.

    Tip: Username and password can also be specified as part of the URL: ftp://username:password@servername
    Kind regards,

    Jan Hoek
    Product Developer
    Mprise Products B.V.
  • rozemarozema Member Posts: 15
    Hello,

    Maybe somebody can help me out?

    At customer location I want to use the msinet ocx.
    It is not available on the desktops....
    Did some browsing on the mighty www: found a version (not perfect - SP4).
    After installation (regsvr32 etc etc) I tried to use it in a codeunit.
    I got the error: ..."INET eist een disign time licentie. U kunt een dergelijkelicentie echter onmogelijk bekomen. Zorg......"

    2 Questions:
    1) Can somebody post the latest MSINET.OCX (or mail it)
    2) Tips on how to register it.

    Thanks, regards, Peter
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Did you create a new ocx variable?

    If you copy a old variable the license check is skipped if I'm correct. At least this works this way for the common dialog thingy.
  • garakgarak Member Posts: 3,263
    Which automation do you use :?:
    Do you make it right, it works too!
Sign In or Register to comment.