>I am using the internet transfer control to ftp files from my app. I want to be able to trap the following errors:
>
>1) Invalid FTP server
>2) Invalid login name
>3) Invalid password
>4) File name to receive does not exist
>5) Invalid directory
>6) Wether FTP was successful
>
>Bacically I need to check for these errors, and if one of them occurs I need to display the appropriate error and exit the ftp.
>
>Is there some way I can trap these. I have tried to use the response code and response message, but I am unable to pick up the errors.
>
>Thanx
>
>Stuart
It appears that my first response didn't stick. For connection problems (timeout, server not found, etc.) do an ON ERROR (maybe after ITC.Execute()). Check out either AERROR() or SYS(2018) for OLE error information. You could add some handling code in the Error event of the control. Also, in the StateChanged event of the control, the 'state' parameter is passed. If the state = 11 (icError), then parse the control's ResponseInfo for server-side errors.
Phillip
"D'OH!" --Homer Simpson