FileSystemObject Scripting don't work

  • Thread starter Bob Barrows [MVP]
  • Start date
B

Bob Barrows [MVP]

Edward said:
Hi All,
Get it work once i disable the script blockin in my Antivirus
setting....
Thanks for letting us know, but if someone had already wasted his time
replying to this question here without realizing you had already received an
answer in .asp.db (what does this question have to do with db's anyways? why
post it there at all?), he would not have been a happy camper. What are the
chances that he would respond to any further questions from you?

Please don't multipost. The best practice is to pick a single newgroup that
you feel is most relevant to your question and post it there. If you've
guessed wrong, someone will let you know (usually politely). If you feel you
must get input from members of more than one group, crosspost instead of
multiposting by putting the names of each group into the To field of a
single newsgroup post. That way responses will be seen by all regardless of
which newsgroup the responses originated in. Again, it is best to keep the
number of groups in the crosspost small.

Bob Barrows
 
E

Edward Low

Hi,

I am having ASP with the following code to access the file with windows
scripting host. The page run on local server IIS 5.1 on Win XP Pro SP2. The
IE never show me any error with this, but will keep access the page for very
long. This code is running fine on other system.

strFilePath = Server.MapPath("\db\counter.txt")
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.OpenTextFile(strFilePath, ForReading)
iCounterNumber = Cdbl(objCounterFile.ReadLine) + 1
objCounterFile.Close

This code will work fine if i change 3rd line to
[objFSO.OpenTextFile(strFilePath,1) ].

Questions:
1. Why objFSO.OpenTextFile(strFilePath, ForReading) can't work on my system
but can run on the others system.
2. Why IE never show me error message but keep accessing the page for very
long with the above code?

thanks & regards,

Edward
 
E

Edward Low

Hi All,
Get it work once i disable the script blockin in my Antivirus setting....

Thanks
Edward
 
B

Bob Barrows [MVP]

I'm sorry you think it's picky. The view I normally use sorts the messages
by posting date. I almost replied to the wrong message because the OP's
clock was set incorrectly. I thought he might appreciate knowing that his
clock was wrong. My only fault (IMO) was saying it too curtly which I now
regret.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top