| | |
|
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: |
Stream object |
From: |
Ricardo |
Date: |
8/24/2002 3:04:56 AM |
IP: |
64.229.85.117 |
I wanted to read an ascii file located on the root of my site and I wanted to use the ADO stream object instead of the file system object.
I used the following script
Dim r, s
Set r = Server.Createobject("adodb.record")
set s = Server.Createobject("adodb.stream")
r.Open URL,,1
s.Open r,,4
URL is the URL to the file I wanted to open in the form "http://..."
I tested this script on my local computer running Windows XP Proffessional, IIS 5.1 and it worked fine.
But on the host, running Windows 2000 Advanced Server and IIS 5.0 it wouldn't.
I tested the property state and it returned the value 1 for the record and 0 for the stream.
It means it opens the record but not the stream.
The server doesn't return any error, it just doesn't open the stream.
It I try to open the stream without a source (an empty stream) it opens it fine.
It's not a file permission issue, I ended up using the file system object and it works, I can open the file.
The server obviously supports the object, it doesn't return any error when I create them and it returns the object's properties.
It seems more an issue with IIS than ASP.
any ideas? |
Follow Up - Re: Stream object - Saqib Ansari 4/3/2004 1:57:34 AM
|
|

|
|
|
|