Click to See Complete Forum and Search --> : Microsoft VBScript runtime error '800a0034'
hooloovoo24
05-05-2005, 06:40 PM
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("http://www.cityofpoulsbo.com/citysite/Sample%20Pages%20Site%20Folder/CityCouncil/event.txt",1)
that code creates an error (see here (http://www.cityofpoulsbo.com/citysite/Sample%20Pages%20Site%20Folder/index.asp))
but I know that that is the correct path, so what am I doing wrong?
buntine
05-05-2005, 07:39 PM
Because you need to supply a local file location. e.g. C:\files\citystate\file.txt
Try this:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(Server.MapPath("CityCouncil/event.txt"),1)
Regards.
buntine
05-05-2005, 07:40 PM
The Viking City! It sounds brutal.
hooloovoo24
05-06-2005, 01:17 PM
oh no, are we that infamous? I once had a guy in Canada come up to me and when he found out I was from Poulsbo, the first thing he said was "Oh, the RV place?" I want to die. Or move.
Anyway, I still can't figure this out. I used the code that you suggested, and it works beautifully...but only on the homepage. If we get into folders, it craps out. Is there a way to make the thing absolute instead of relative? So that no matter where you are in the site, it always starts searching for the file from the same point?
buntine
05-06-2005, 09:35 PM
Yep. You just write it explicitely if you know the location on the server:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\files\whatever\CityCouncil\event.txt",1)
Regards.
hooloovoo24
05-09-2005, 12:54 PM
er....how do I figure that out?
buntine
05-09-2005, 07:49 PM
It seems to be working now. Is it?
hooloovoo24
05-12-2005, 12:38 PM
well, yeah. Thanks for your help. I had to contact my host for the information.