?
Solved

FTP and VB

Posted on 1998-11-11
9
Medium Priority
?
300 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
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 300 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

752 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