View Full Version : Strange Error Message With FileSystem Object
oracleguy
08-28-2002, 08:51 AM
I get this error:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'OpenTextFile'
/olana1/pictures.asp, line 78
And here is my code:
<%
If ID<>"" Then
'Load Picture Information
Dim fs,f
Set fs=Server.CreateObject("Scripting.FileSystemObject")
Set f=fs.OpenTextFile(Server.MapPath("index1.txt"), 1,false)
Dim Descriptions(),x
x=1
Do while f.AtEndOfStream<>True
Descriptions(x)=f.ReadLine
x=x+1
Loop
f.Close
Set f=Nothing
Set fs=Nothing
End If
%>
What's wrong with my code? I've done this stuff before without any problems.
whammy
08-29-2002, 01:01 AM
You got me, offhand it looks ok to me. :(
I'm having a heck of a time with InStr() too on a form at work - for some reason although it returns Long datatype (0 - or something greater if a string is in another string), I cannot get it to work right no matter what... and it's frustrating!
victoria_1018
08-29-2002, 10:32 AM
Try reading the information in this website and I think it may solve your problem. Good luck
:o
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q246596&
oracleguy
08-29-2002, 07:44 PM
Nah doesn't help. I think I may even looked at that article. I tried moving the code into a SSI file but still doesn't work. So I just gave up and tossed all the data into a MySQL database and calling it good. :)
Thanks for trying. Definetly a strange problem.
victoria_1018
08-30-2002, 05:35 AM
Please check if this is the error causing the problem.
I believe it may be the version you are using caused you all these problem.
Check the version of your asp program to ensure that the method(s) you are using is suported.
I have encountered similar problems too, where codes that are supported in win 2000 server may not be supported in PWS.
Beside checking the version, also check the way in which the coding is used and their arrangement.
regards
victoria
:o
Morgoth
08-30-2002, 03:37 PM
Does your IIS shut down with this script?
oracleguy
08-30-2002, 09:42 PM
IIS did shutdown a few times. But sometimes it did not. And some of the times the IIS Web Publishing service "froze" it would timeout stoping the service when i ran the net stop w3svc command. And I had to reboot. The rest of the times it would either display the HTTP Error 500.100 page or i was able to stop and restart the service.
I have another web page on my IIS here that uses the same method but in the global.asax and it works fine.
I even tried putting the code into a include file and that didn't help either.
Morgoth
08-31-2002, 01:10 PM
I think it's an error with the microsoft patch, because I know for a fact it worked before the security patch was installed.
I need to find an better, not to complicated method to take this ones place!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.