Has anyone out there an OCX to connect to an FTP-Server from within NAVISION-Financials? I tried EZftp and FTP/X but I need the funcionality of getting e. g. a connect’s result in a NAVISION-Variable to control further execution. In both packet I tried you can only EZftp.CONNECT(); which causes a runtime error which then requires user interaction. I need something like IF EZftp.CONNECT() THEN …
I onced used FTP/X in a VB project. It was possible using the ’ .Connect username, password method. If connection failed, no error was raised. Instead you had to check the .State property to determine succesful connection… ICM Solutions B.V. ir. D.C. Oerlemans dc.oerlemans@icm-solutions.nl
Do a search for Brattberg FTP control on a search engine. It’s a nice freeware ocx, that performs what you are requesting. If you are not able to find, i will search my old files, and send you the file. Best regards, Soren Nielsen, moderator Navision Online User Group
I recently had to do file transfers and I needed to know if I had a connection before I executed some Dataports in NF. I used the standard dos FTP to log on to a ftp server and download a file which I knew was there and then checked if it existed after the shell command executing the ftp script returned. I don’t have the code I used at hand but from memory… // in nf returnvalue := SHELL(‘command.com’,’/c’,‘ftp -i -v -s:c:\ftpcommandfile’); if EXISTS(filename) then begin ERASE(filename); message(‘Connected’); else message(‘Not connected’) // end nf the ftpcommandfile looked something like: open server username password cd directory of file to get lcd directory we want to put the file in mget filename quit