ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 3rd, 2003, 11:21 AM
jpeer jpeer is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jpeer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problems with ASP and fs.CreateTextFile

I have an asp page that does several things in a row:
1) Add form data to a database
2) Create a folder at a specific address on the server
3) Then create an index.asp page within that folder

The problem is with step 3 - sometime it works but often it errors with Path Not Found when trying to create the text (index.asp) file.

I've done a Response.Write to make sure that the location it is trying to create the file in is correct and it is.
Could it be an issue with lag; the folder not being created quickly enough before the text file is attempting to create within it???

Reply With Quote
  #2  
Old July 4th, 2003, 01:42 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
I doubt it's lag - the createfolder method shouldn't finish until the folder is created.

When creating anything like files or folders, you should always check their existance first by using either:
objFso.FolderExists(foo)
or
objFso.FileExists(foo)

This will show if if there's a problem.

I assume you've also got all your permissions setup correctly?
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old July 4th, 2003, 03:12 AM
jpeer jpeer is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 jpeer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I tried that testing method by testing to see if the folder was created before trying to create the file within it but it threw the same error suggesting that the folder did indeed exist. Checked all permissions etc - the really wierd fact is that the problem seems to be intermitent!

Reply With Quote
  #4  
Old July 30th, 2003, 08:11 AM
rdoekes rdoekes is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Strasbourg, France
Posts: 181 rdoekes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 20 sec
Reputation Power: 7
Send a message via AIM to rdoekes Send a message via Yahoo to rdoekes
maybe left field answer, but I seem to have a lot success with the OpenTextFile method with the with the create part set to True in cases like these.

Does this help?
__________________
- Rogier Doekes

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingASP Development > Problems with ASP and fs.CreateTextFile


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT