Wrox Programmer Forums
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." 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 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 14th, 2006, 02:06 PM
Authorized User
Join Date: Nov 2005
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default Array from file

I need ASP code to fill an array from a text file. The text file exists in the same physical directory as the ASP page.
Old March 14th, 2006, 07:34 PM
Friend of Wrox
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

can be done using the FileSystemObject component. When opening a text file you simply open it as a text stream, and it is this text stream that you use to access the contents of the file....


Wind is your friend
Old March 14th, 2006, 08:10 PM
Wrox Technical Editor
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts

Is your file delimited (example: is it an excel file delimited by commas, etc...)?

How large is your file?

If the file is relatively small you can use the Split method combined with the FileSystemObject that mat41 suggested.

- A.Kahtava

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot invoke getName() on the array type File[] fuadlutfi85 JSP Basics 1 July 13th, 2007 03:43 AM
return more then one array from class file Komila ASP.NET 2.0 Basics 4 June 27th, 2007 07:10 PM
Inserting text file lines into an array? georginho Visual Basic 2005 Basics 8 January 15th, 2007 09:44 AM
Array error in checkout3 file JDBennett BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 5 January 4th, 2005 06:57 PM
Text File to Array chadlupkes Javascript How-To 4 September 19th, 2003 09:11 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.