-
1 Attachment(s)
[RESOLVED] Uploading file tp FTP
Westconn have given me a code to upload file to ftp. He also checked it from his pc.I also provided him my username and password. The file is uploading from his pc but there is an error at line "if not ret=1 rthen stop. I am uploading the project. Please check it.
-
Re: Uploading file tp FTP
-
Re: Uploading file tp FTP
i just looked at your frm code, you need to enlose your filename in quotes as it has spaces in the path
vb Code:
localfname = """C:\Documents and Settings\Vivek\Desktop\vivek.txt"""
-
Re: Uploading file tp FTP
Now also its giving same error.
-
Re: Uploading file tp FTP
on testing the file name does not need to be quoted
i pasted the code from your uploaded project (no edits) into excel 97 modules, on a win98 machine, it conneceted to the ftp server, i only then had to change the local filename to a valid file on this computer for it to upload, so far i have tried the code on 3 computers from different locations
i suggest you try your code on another computer, a different internet connection or both. if you can't run in vb6 you could do as i and run in word or excel, else compile a program, with a msgbox to return values of session server and ret, don't forget the text file to upload
another option is to try replacing the dll that is used to connect to the ftpserver, but as the other apis use the same dll i don't see why there should b a problem
-
Re: Uploading file tp FTP
What dll is required to connect to the ftpserver?
-
Re: Uploading file tp FTP
In excel the same error is coming.As u mentioned in PM.
-
Re: Uploading file tp FTP
Quote:
Public Declare Function InternetConnect Lib "wininet.dll" Alias "InternetConnectA" (ByVal pub_lngInternetSession As Long, ByVal sServerName As String, ByVal nServerPort As Integer, ByVal sUsername As String, ByVal sPassword As String, ByVal lService As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
this is the dll used by most of the internet apis
-
Re: Uploading file tp FTP
Check this link
http://support.microsoft.com/default...;EN-US;q175179
download the VBFTP.exe .This has the WinINet API module.
-
Re: Uploading file tp FTP
I am having wininet.dll in my system directory.
-
Re: Uploading file tp FTP
Have you tried the VBFTP project ? Try adding the module "WININET.Bas" to your project.
-
Re: Uploading file tp FTP
One more thing. I just downloaded a ftp program from pscode which i used around 1 or two yrs back when i had win98. it worked fine at that time. But now its not working. Now i am 100% that there is a prob. of dll files. i think my wininet.dll is corrupted. I downloaded a new wininet.dll.but how to replace with the current wininet.dll which is present in my system dir. I am trying to overwrite or delete it. But there is error that it is used by other programs. I closed all program then also there is a same error.
-
Re: Uploading file tp FTP
Thanks amrita. I tried vbftp but its giving same error 12029!
-
Re: Uploading file tp FTP
The problem is not about codes. There are thousand of codes for uploading file to ftp. I think the prob. is related to dll files. My firewall is also disabled.
-
Re: Uploading file tp FTP
Enable firewall clent. and see.
-
Re: Uploading file tp FTP
I downloaded a software smartftp. Thats also giving error. The only software working is Download accelerater.
-
Re: Uploading file tp FTP
unregister the dll first, then register again when updated
or start in safe mode
or dos mode
-
Re: Uploading file tp FTP
The result is same amrita after enabling firewall.
-
Re: Uploading file tp FTP
Are you using Passive mode for FTP communication ? If so change it to active and see.
One more thing are u using IE7 ?
-
Re: Uploading file tp FTP
-
Re: Uploading file tp FTP
I have used both in some programs.Results were same.
-
Re: Uploading file tp FTP
Hi westconn when i am trying to unrigister dll then error is coming "wininet.dll was loaded but the dllunregisterserver entry point was not found. This file cannot be registered."
-
Re: Uploading file tp FTP
I am using the command "regsvr32 /u wininet.dll"
-
Re: Uploading file tp FTP
do a google for a progam called unlocker that is what i use to allow me to delete files that don't want to go, once you "unlock" it you should be able to copy over it
-
Re: Uploading file tp FTP
The unlocker software is also not working!!
-
Re: Uploading file tp FTP
did you try safe mode or dos mode?
-
Re: Uploading file tp FTP
-
Re: Uploading file tp FTP
Also used scf/scannow command. It does not show any error.
-
Re: Uploading file tp FTP
i really am right out of ideas about it not working for you, have tried the code on 3 machines, with xp or win98, and at different location (different countries), everytime it just works
-
Re: Uploading file tp FTP
Is wininet.dll corrupted? How to scan dll files? Can u recommend any software for scanning dll files?But i have used scannow command in dos. One more thing when i am typing nslokkup command then the message is displaying "***Can't find server name address myip: non-existed domain
***default server are not available
default server unknown
-
Re: Uploading file tp FTP
Quote:
Is wininet.dll corrupted? How to scan dll files? Can u recommend any software for scanning dll files?But i have used scannow command in dos. One more thing when i am typing nslokkup command then the message is displaying "***Can't find server name address myip: non-existed domain
***default server are not available
default server unknown
i think that is normal for nslookup
type ftp.avi-bags.com at the nslookup prompt, should return like
Quote:
> ftp.avi-bags.com
Server: UnKnown
Address: 10.0.0.2
Non-authoritative answer:
Name: avi-bags.com
Address: 209.120.245.163
Aliases: ftp.avi-bags.com
>
-
Re: Uploading file tp FTP
Yes but the address u mentioned is differnet which i m getting. But can dll files be corrupted? I dont think that wininet is corrupted becasuse other applications r using it. How to scan dll files?
-
Re: Uploading file tp FTP
Hurrrrrahhhhhhhhhhhhhhhhhhhhhh! It worked. Thanks u very much. U coperated a lot. I dont know how it worked. And other codes are also working. Thanks!!!!!!!
-
Re: [RESOLVED] Uploading file tp FTP
i am pleased you got it working at last
-
Re: [RESOLVED] Uploading file tp FTP
westconn1 I like your code thank you!
I have been trying to verify the file after upload but I have not gotten it to work.
Would you have a snippet that might point me in the right direction?
Thanks,
John