FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands
FTP PUT & APPEND commands FTP PUT & APPEND commands
FTP PUT & APPEND commands
Go Back  Xtreme Visual Basic Talk > > > FTP PUT & APPEND commands


Reply
 
Thread Tools Display Modes
  #1  
Old 05-24-2005, 08:38 AM
tomtraxler tomtraxler is offline
Freshman
 
Join Date: May 2003
Posts: 42
Default FTP PUT & APPEND commands


I use the following code (modified from Visual Basic 6 Black Book) to have an online registration using FTP. I works fine to PUT the reg.dat file onto my server, but when I try to APPEND another registration, it hangs up with the
the following setting for State:
icResponseReceived 8 The control successfully received a response from the host computer.

When I try to APPEND, I am simply deleting the PUT below and replacing it with APPEND.

Any help? Thanks.
------------------------------------


Private Sub Command1_Click()
Open "c:\temp.dat" For Output As #1
Print #1, "Registering All-In-One Child Support Calculator Version 6.0" & vbCrLf
Print #1, "Name: " & Text1.Text & vbCrLf
Print #1, "email: " & Text2.Text & vbCrLf
Print #1, "Time: " & Format(Now)
Close #1

Inet1.URL = ""
Inet1.URL = "ftp://ftp.[mywebsite.com]"
Inet1.UserName = "[my user name]"
Inet1.Password = "[my password]"
Inet1.Execute , "PUT c:\temp.dat reg.dat" 'change to APPEND

End Sub

Private Sub Inet1_StateChanged(ByVal State As Integer)

Label4 = State

If State = 11 Then Label4 = "ErrorCode: " & Inet1.ResponseCode & " : " & Inet1.ResponseInfo

If State = icResponseCompleted Then
Inet1.Execute , "Close"

Dim FileSystemObject As Object
Set FileSystemObject = CreateObject("Scripting.FileSystemObject")
FileSystemObject.DeleteFile "c:\temp.dat"

frmRegistration.Hide
End If
End Sub
Reply With Quote
  #2  
Old 05-24-2005, 01:58 PM
William_Cain's Avatar
William_Cain William_Cain is offline
Junior Contributor
 
Join Date: Jul 2004
Location: Norway
Posts: 318
Default

Actually, not many FTP servers support append.
I think this is a weakness.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands FTP PUT & APPEND commands
FTP PUT & APPEND commands
FTP PUT & APPEND commands
 
FTP PUT & APPEND commands
FTP PUT & APPEND commands
 
-->