ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 28th, 2003, 09:33 AM
amigo_largo amigo_largo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: elsewhere
Posts: 11 amigo_largo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
asp to read textfile pass vars to flash

Hi all.

I'm trying to read data from a textfile into flash. The textfile is stored in a folder 'DATA' a level up from the root of the website, so Flash cannot read from it directly, so I have to use ASP, which I am not too familiar with..

this is what I have tried:

Code:<%
Option Explicit
' Set up constants
Const ForReading = 1
Const Create = False

' Declare local variables
Dim objFSO ' FileSystemObject
Dim TS ' TextStreamObject
Dim strLine ' local variable to store Line
Dim strFileName ' local variable to store fileName

strFileName = Server.MapPath("../DATA/properties_remaining.txt")

' Instantiate the FileSystemObject
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

' use Opentextfile Method to Open the text File
Set TS = objFSO.OpenTextFile(strFileName, ForReading, Create)

If Not TS.AtEndOfStream Then

Do While Not TS.AtendOfStream

strLine = TS.ReadLine ' Read one line at a time
Response.Write strLine ' Display that line
Response.Write "<br>"

Loop

End If

' close TextStreamObject
' and destroy local variables to relase memory
TS.Close
Set TS = Nothing
Set objFSO = Nothing
%>




but on IE i get a http internal server error and in NS6 I get the following:

Code:Microsoft VBScript runtime error '800a0035'

File not found

/read_data.asp, line 19




can anyone offer any help with this method, or perhaps suggest an alternative?

thanks.

Reply With Quote
  #2  
Old July 28th, 2003, 10:35 AM
nopoints nopoints is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Windsor ON, Canada
Posts: 459 nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level)nopoints User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 44 m 22 sec
Reputation Power: 8
can you explain the directory structure a little more?

what i currently see is:
Code:
AboveRoot
   |
   |---Root
   |
   |---DATA

so the root of the website and the DATA folder are in the same parent folder (AboveRoot). is that correct?

the error occurs on this line right?
Set TS = objFSO.OpenTextFile(strFileName, ForReading, Create)
__________________
Programmer's Corner

Reply With Quote
  #3  
Old July 28th, 2003, 11:56 AM
amigo_largo amigo_largo is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2003
Location: elsewhere
Posts: 11 amigo_largo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
hi nopoints.. thanks for your reply.. sorry if I have been a little unclear. On the server there are two directories:

HTML and DATA

inside HTML is the root of the website. The error only occurs with Netscape 6, with IE, I get a http 500 internal server error.

thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > asp to read textfile pass vars to flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway