Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 1st, 2005, 03:17 PM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Help Plz

dim f2
'dim ts
Set f2 = fso.GetFile("w:\boseo\" & strFile)
Set ts = f2.OpenAsTextStream(1,-2)

do while ts.AtEndOfStream = False
    Response.Write ts.ReadLine & "<BR>"

'(how can i collect the vaues from the file and put them in the right order? How can i create a variable to store all the data in and then i can just call that variable later?)

loop
--------------------------------
how can i collect the vaues from the file and put them in the right order?

How can i create a variable to store all the data in and then i can just call that variable later?

Reply With Quote
  #2 (permalink)  
Old February 1st, 2005, 03:40 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Please check the following function which reads all contents from a file:

Function ReadAllTextFile
   Const ForReading = 1, ForWriting = 2
   Dim fso, f
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set f = fso.OpenTextFile("c:\testfile.txt", ForWriting, True)
   f.Write "Hello world!"
   Set f = fso.OpenTextFile("c:\testfile.txt", ForReading)
   ReadAllTextFile = f.ReadAll
End Function

To read line by line you can use

 Do While theFile.AtEndOfStream = false
       retstring = theFile.ReadLine 'This will give u single line.
 Loop



Om Prakash
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
plz.....plz solve out my problem.... kethireddy435 ASP.NET 1.x and 2.0 Application Design 1 October 4th, 2007 12:56 PM
image varification problem in asp.net1.1 plz help nirmalbarsainyan ASP.NET 1.x and 2.0 Application Design 0 November 15th, 2006 12:54 AM
Ms access database in asp-urgent plz netfresher Classic ASP Basics 1 June 30th, 2006 03:35 PM
Help me plz waqaraziz VB.NET 2002/2003 Basics 1 March 19th, 2005 04:40 PM
I'm a bignner to ASP.NET, plz help me salman .NET Web Services 1 January 7th, 2004 05:24 PM



All times are GMT -4. The time now is 07:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.