[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Classic asp read from url

Posted on 2014-12-09
2
Medium Priority
?
274 Views
Last Modified: 2014-12-09
Hi.

I need to read all lines from a csv file online.

Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
xmlhttp.Open "GET", "http://www.url.dk/files/file.csv" , False
xmlhttp.Send
txt = xmlhttp.responseText
Set xmlhttp = Nothing

Now i have the file in the variable txt.
How does i read from txt now.

something like http://www.w3schools.com/asp/met_readall.asp
But I cant read from stream.

In asp.net it´s easy, just like:
StreamReader SR = new StreamReader(txt, Encoding.Default);
But how is this possible in classic?
0
Comment
Question by:bongii
[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
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 2000 total points
ID: 40488547
in classic asp, you would just "split" the value of txt by the carriage/return character

LineArray = Split(txt , chr(10))

and then you can loop from lBound(LineArray) to uBound(LineArray) to take each line individually
0
 

Author Comment

by:bongii
ID: 40488568
Arhh yes of couse :) Thx man
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

656 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