Re: FileSystemObject don"t work
am 01.12.2005 03:54:59 von dave
check ur anti virus setting...make sure its not blocking scripting object...
dave
"Edward Low" wrote in message
news:eTgpT%23h9FHA.1276@TK2MSFTNGP09.phx.gbl...
> 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
>
FileSystemObject don"t work
am 01.12.2005 19:35:27 von 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
Re: FileSystemObject don"t work
am 01.12.2005 20:24:28 von Edward Low
Thanks Dave,
I got it work once i disable the scripting blocking in my anti virus.
You r the best...
Regards,
Edward
"dave" wrote in message
news:O6PBhKi9FHA.808@TK2MSFTNGP09.phx.gbl...
> check ur anti virus setting...make sure its not blocking scripting
> object...
> dave
>
> "Edward Low" wrote in message
> news:eTgpT%23h9FHA.1276@TK2MSFTNGP09.phx.gbl...
>> 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
>>
>
>