|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
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
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > asp to read textfile pass vars to flash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|