Sheng:
You posted some code here. Could you post the complete function so I can see what the values for the variables come from.
Thanks
Your Code
Code: Select all | Expand
// Create ftp connect
oFtp := TFtp():New( cFTP_IP, oInternet, cUsername, cPassword )
If oFtp:hFtp == 0
Tone( 1000, 1 )
MsgStop( "Ftp connect fail!", "Error!" )
oFtp:End()
Exit
EndIf
:
:
:
// Open remote file
oFtpFile := TFtpFile():New( cServerFile, oFtp )
oFtpFile:lBinary := .T.
//
oFtpFile:OpenRead() // Open and Read mode
If oFtpFile:nError <> 0
Tone( 1000, 1 )
MsgStop( "ftp file:["+cServerFile+"]Open & read fail!!", "Error!" )
oFtpFile:End()
lRet := .F.
Exit
EndIf
User and pass word i understand.
What about: cFTP_IP, cServerfile what are these values?