loHttp.cErrorMsg will hopefully hold more information. 12003 is an FTP error and the error message should forward the message from the server.
Most likely it's an invalid path/server name, or permissions denied.
+++ Rick ---
from Maui, Hawaii
From: | Rick Strahl |
To: | Frits van den Munckhof |
Most likely it's an invalid path/server name, or permissions denied.
+++ Rick ---
I feel a a little "retarded", but can I get any other error message than the result code?
I'm not in a position to test at this moment. But I suspect the problem could be that I didn't start cTarget with a forward slash (though I used a FULLPATH() for the cSource).
Could that be the problem? A simple Yes or No would be great.
Make sure the server names and paths are correct and trimmed too.
FtpConnect() actually doesn't connect (in the typical style of WinInet), but simply sets the connection parameters. It's not until you actually do something with the connection that the actual network operations start to happen. Rarely do you see an error on FtpConnect() unless the domain names are completely wrong/invalid.
+++ Rick ---
This first part succeeds (resultcode 0)
LOCAL lnResult lnResult=THISFORM.Ftp.FTPconnect(ALLTRIM(THISFORM.txtFTPserver.Value),ALLTRIM(THISFORM.txtUserID.Value),ALLTRIM(THISFORM.txtPassword.Value))IF lnResult=0* Succes AppMsg("De connectie met de FTP-server '"+THISFORM.txtFTPserver.Value+"' is geslaagd","Connectie geslaagd","I") THISFORM.Ftp.FTPclose()ELSE* Connectie mislukt AppMsg("De connectie met de FTP-server '"+THISFORM.txtFTPserver.Value+"' is mislukt. WinInet Error code: "+TRIMSTR(lnResult),"Connectie mislukt","X")RETURN .F.ENDIF
This second statement fails (resultcode 12003), of course without changing the input values for the text-fields between the 2 calls.
lnResult=THISFORM.Ftp.FTPsendfile(ALLTRIM(THISFORM.txtFTPserver.Value),lcFile,JUSTFNAME(lcFile),;ALLTRIM(THISFORM.txtUserID.Value),ALLTRIM(THISFORM.txtPassword.Value))
This is not a very useful error request.
What's the code? What and when does it fail?
Check the server name and make sure the domain name is correct and trimmed.
+++ Rick ---
Just connecting to the server succeeds.
I've tried setting lpassiveftp to .T.. That doesn't seem to work. Same error. Any other ideas?