Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My Ftp program
Message
De
19/03/2003 13:27:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Titre:
My Ftp program
Divers
Thread ID:
00767693
Message ID:
00767693
Vues:
55
All,

I want to FTP some XML file to Taiwan everyday. But I get fail when doing "FtpPutFile".
What is my stort in my code?
Give me your suggestion.

***************************************************************
DECLARE Integer InternetOpen IN WinInet String @lpcAgent, Integer nAccessType, String @lpcProxyName, ;
String @lpcProxyBypass, Integer nFlags

DECLARE Integer InternetConnect IN WinInet ;
Integer nInet_Handle, String @lpcServer, Short nPort, String @cUserName, String @cPassword, Integer ;
nService, Integer nFlags, Integer nContext

DECLARE Integer FtpPutFile IN WinInet Integer FtpHandle, String @NewFile, String @RemoteFile, Integer ;
nFlags, Integer nContext

#DEFINE cNull CHR(0)

**
cHostName = "888.88.8.8" + cNull
cUserName = "ftpuser" + cNull
cPassWord = "ftpuser" + cNull
FtpAgent = "FTP Agent by me"

InternetHandle = InternetOpen((FtpAgent), 1, cNull, cNull, 0)

FtpHandle = InternetConnect(InternetHandle, (cHostName), 21, (cUserName), (cPassword), 1, 0, 0)

localFile = "c:\2.txt" + cNull
RemoteFile = "/SSIS/2.txt" + cNull

nResult = FtpPutFile(FtpHandle, @localFile, @RemoteFile, 2, 0)

IF nResult = 1
=messagebox("OK!")
else
=messagebox("Fail!")
endif



Ricky
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform