Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Uploading file to a webserver

Status
Not open for further replies.

perltk07

Programmer
Apr 2, 2007
13
US
I am trying to upload a csv file to a server using VB Pro 2005.

Following is my code. It does not recognize Upload and asks for chilkat.exe. Does anyone have any better suggestion on how to do this?

Public Sub Upload()

Dim upload As New Chilkat.Upload
upload.Hostname = " upload.Path = "/wyz.cgi"
' Add one or more files to be uploaded.
upload.AddFileReference("file1", "updates_document.csv")
'upload.AddFileReference("file2","pigs.xml")
'upload.AddFileReference("file3","sample.doc")

' Do the upload. The method returns when the upload
' is completed.
' This component also includes asynchronous upload capability,
' which is demonstrated in another example.
End Sub

Public Sub Success()
Dim success As Boolean
success = Upload.BlockingUpload()
If (success <> True) Then
MsgBox(Upload.LastErrorText)
Else

End If
MsgBox("Files uploaded!")
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top