Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 08:44 AM
Freeserve
Guest
 
Posts: n/a
Default script problem

I am trying to write to a file using:

<%

Sub OpenTextFileTest

Const ForReading = 1, ForWriting = 2, ForAppending = 8

Dim fso, f

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso.OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending, True)

f.Write "Hello world!"

f.Close

End Sub

%>



When i call this the script hangs. If I try page refresh, I get "The
requested resource is in use". I have to kill the dllhost.exe process to
free things up.

Any ideas why this won't work?


  #2  
Old July 19th, 2005, 08:44 AM
Stuart Palmer
Guest
 
Posts: n/a
Default Re: script problem

Sounds like classic script blocking problem, I am guessing you have norton
antivirus on your machine? Go into NAV and locate script
blocking.....disable it and then things should start working.

Something to do with script block and the FSO.

Good luck

Stu

"Freeserve" <nospam@bigfoot.com> wrote in message
news:blji7u$qou$1@news6.svr.pol.co.uk...[color=blue]
> I am trying to write to a file using:
>
> <%
>
> Sub OpenTextFileTest
>
> Const ForReading = 1, ForWriting = 2, ForAppending = 8
>
> Dim fso, f
>
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> Set f = fso.OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending,[/color]
True)[color=blue]
>
> f.Write "Hello world!"
>
> f.Close
>
> End Sub
>
> %>
>
>
>
> When i call this the script hangs. If I try page refresh, I get "The
> requested resource is in use". I have to kill the dllhost.exe process to
> free things up.
>
> Any ideas why this won't work?
>
>[/color]


  #3  
Old July 19th, 2005, 08:44 AM
Freeserve
Guest
 
Posts: n/a
Default Re: script problem

Yes. That fixed it. Thanks.

"Stuart Palmer" <tryandspamme@youcant.com> wrote in message
news:bljl6f$1e6k$1@sp15at20.hursley.ibm.com...[color=blue]
> Sounds like classic script blocking problem, I am guessing you have norton
> antivirus on your machine? Go into NAV and locate script
> blocking.....disable it and then things should start working.
>
> Something to do with script block and the FSO.
>
> Good luck
>
> Stu
>
> "Freeserve" <nospam@bigfoot.com> wrote in message
> news:blji7u$qou$1@news6.svr.pol.co.uk...[color=green]
> > I am trying to write to a file using:
> >
> > <%
> >
> > Sub OpenTextFileTest
> >
> > Const ForReading = 1, ForWriting = 2, ForAppending = 8
> >
> > Dim fso, f
> >
> > Set fso = CreateObject("Scripting.FileSystemObject")
> >
> > Set f = fso.OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending,[/color]
> True)[color=green]
> >
> > f.Write "Hello world!"
> >
> > f.Close
> >
> > End Sub
> >
> > %>
> >
> >
> >
> > When i call this the script hangs. If I try page refresh, I get "The
> > requested resource is in use". I have to kill the dllhost.exe process[/color][/color]
to[color=blue][color=green]
> > free things up.
> >
> > Any ideas why this won't work?
> >
> >[/color]
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles