Solved

FTP and VB

Posted on 1998-11-11
9
293 Views
Last Modified: 2013-11-13
I'm using the inet control in VB 6 and want to connect and download a simple text file.

The problem is that when i download the file it's in binary mode not in text mode.  I could reproduce the same in FTP when i set the mode to binary and then transfert manually the file, if i want it in ascii i have to type "type ascii" in the FTP window, i've try that in the inet control but it does'nt work it freeze the command line instead, anybody know how....
0
Comment
Question by:dabellei
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 1

Expert Comment

by:MAVERICK
ID: 1444375
My Friend made a FTP client using VB..... We had alot of trouble getting things to work with the Inet control.... much better to use Winsock

Jon

0
 
LVL 1

Expert Comment

by:dwalex
ID: 1444376
I also did an FTP client in VB some time ago. I had no trouble using an FTP client DLL I found, probably at Shareware.com. One reference I can find is this one:

H&S Technology, Inc.
P.O. Box 5152
Katy, TX  77491-5152
Tel: (281) 395-0345
Email: 70531.1066@compuserve.com
URL: http://www.hnstech.com

but I don't think they're the best alternative, because they cost. The one I chose was FREE, and came from a guy in France. Saved a client $100,000 with that technology. Search for the one from France.
0
 
LVL 2

Author Comment

by:dabellei
ID: 1444377
Sorry can't acept your answer it's not really an answer...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:HATCHET
ID: 1444378
Inet1.URL = "http://w3.one.net/~kevinw/index.html"
Text1.Text = Inet1.OpenURL

Those two lines are all you need to download TEXT.
The above two lines assumes you have a Microsoft Internet Transfer Control on the same form as the code is being called from and that it's named "Inet1".  It also assumes you have a standard TextBox Control called "Text1" on the same form as the code is being called from.  You can substitute the Text1.Text with a String variable if you like and then do with the data whatever you please.

HATCHET
0
 
LVL 2

Author Comment

by:dabellei
ID: 1444379
i've try that it does'nt work
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1444380
I tested it in a new project.  What do you mean it doesn't work?!  What version of VB are you using?  What OS you have?

HATCHET
0
 
LVL 1

Accepted Solution

by:
soeding earned 100 total points
ID: 1444381
HATCHET:

Dim txt As String
Dim b() As Byte
Dim t As Integer

b() = Inet1.OpenURL("http://myURL", 1)

For t = 0 To UBound(b) - 1
    txt = txt + Chr(b(t))
Next

RichTextBox1.Text = txt

0
 
LVL 1

Expert Comment

by:soeding
ID: 1444382
(answer was addressed to daballei ;-)
0
 
LVL 3

Expert Comment

by:HATCHET
ID: 1444383
=]
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question