Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - file system object - buffer problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

file system object - buffer problem

 Post Reply Post Reply
Author
Nathan View Drop Down
Groupie
Groupie


Joined: 08 January 2002
Location: Greece
Status: Offline
Points: 160
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nathan Quote  Post ReplyReply Direct Link To This Post Topic: file system object - buffer problem
    Posted: 11 February 2004 at 4:10am

I am trying to save a large text file (15kb) using the filesystemobject but when I try to save the  file, I get nothing - seems to be a buffer problem. Works fine with smaller files.

Any ideas what I am doing wrong.

Thanks

Nathan

Back to Top
dj air View Drop Down
Senior Member
Senior Member
Avatar

Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
Post Options Post Options   Thanks (0) Thanks(0)   Quote dj air Quote  Post ReplyReply Direct Link To This Post Posted: 11 February 2004 at 3:00pm

how long is it taking to upload (take to crash )..

is the server timeout high enough

what error are you getting ....

Back to Top
Nathan View Drop Down
Groupie
Groupie


Joined: 08 January 2002
Location: Greece
Status: Offline
Points: 160
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nathan Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2004 at 8:20am

Basicaly we are trying to make Html versions of all the posts in our forum.

Hence the code:

<%
dim fs,fname
set fs=Server.CreateObject("Scripting.FileSystemObject")
set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")  

for i = 1000 to 1301
  xmlhttp.open "GET", " http://www.corfu-travel-guide.info/message_boards/display_to pic_threads.asp?print_page=1&TopicID =" & i ,false
 xmlhttp.send  

'write to a file
set fname=fs.OpenTextFile(Server.MapPath("./corfu_posts/topic_" & i & ".html") ,2,true)
fname.Write(xmlhttp.ResponseText)
fname.Close

next

set xmlhttp = nothing 
set fname=nothing
set fs=nothing

%>

Back to Top
pmormr View Drop Down
Senior Member
Senior Member


Joined: 06 January 2003
Location: United States
Status: Offline
Points: 1479
Post Options Post Options   Thanks (0) Thanks(0)   Quote pmormr Quote  Post ReplyReply Direct Link To This Post Posted: 13 February 2004 at 3:07pm

try putting

Response.Buffer = FALSE

at the top and see if that helps

Back to Top
Nathan View Drop Down
Groupie
Groupie


Joined: 08 January 2002
Location: Greece
Status: Offline
Points: 160
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nathan Quote  Post ReplyReply Direct Link To This Post Posted: 15 February 2004 at 5:36am

Thanks Paul. We tried that, but it is the same.

Incidentally, if we first 'GET' the page, and then writeout to the screen, it is fine. But, when we save the object as an html file, we only get about half of the htlm saved. That's why we think it may be a buffer problem. I am getting no crash or error code with the script.

Incidentally, the reason for trying to export all of my treads to HTML pages, is so that when my site visitors use my 'Site Search' (WWG one) they will be able to search all of my site and the forum posts.

Am I going about this in the correct way?

Thanks

Nathan



Edited by Nathan
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.