|
|
|
|
|
| | |
|
Active Server Pages ASP a directory of ASP tutorials applications scripts components and articles for the novice to professional developer. CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Parsing data from readBinary w/no external components |
From: |
Nate P |
Date: |
5/6/1999 10:36:16 AM |
IP: |
12.25.1.122 |
I am interested in parsing data returned from
the Request.readBinary function without the use
of external components.
The file I want to parse is a plain text file.
I have tried all kinds of ways to extract the
byte stream so that it looks like a string that
I can manipulate but I keep getting either errors
from trying to cast with cstr() or chr() etc. or else the result string comes back as a bunch of
question marks in the client browser anytime I try
to extract more than one character.
I have seen the tutorial about uploading files
where it has an example of using readBinary where
the author outputs each byte back to the client
using response.write midb(data,i,1). This works
fine, but asp is not allowing me to extract
substrings from the byte array. This tutorial even
mentions that the data returned from readBinary is
a safe byte array and not a safe variant array.
Does this mean it is impossible to parse the data
without the use of a component to do the necessary
typecasting?
If you are interested as to why I do not want to
use additional components it is because:
1)My pages live on a server that I have zero
control over and it is difficult to get the admin
to put anything but asp scripts on (i.e. no exe
of dll!).
2)I do not want to save the uploaded file. I just
want to parse it to use as input for my web app.
Luckily the text files are not that big so my
fallback plan is to use a textarea form field and
let the users just copy->paste the file into it
but a file upload would be much more elegant.
Thanks in advance for any help on this.
|
|
|

|
|
|
|
|
|
|
|
|
|