|
-
Nov 19th, 2002, 05:10 PM
#1
Thread Starter
Frenzied Member
(ASP & XML) reading files too fast? **Resolved**
I'm looping through some xml files, adding (or updating) the data to the database, then moving the file to a different folder. I think it is going to fast and messing up... is there a way to slow it down?
my loop is just a for loop (for each item in objFolder.Files)
thanks
michael
Last edited by msimmons; Nov 20th, 2002 at 03:42 PM.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 05:14 PM
#2
***?!
Too fast?! Usually it's the other way around. What are you smoking? (and why aren't you sharing?)
-
Nov 19th, 2002, 05:29 PM
#3
Thread Starter
Frenzied Member
Originally posted by techgnome
***?!
Too fast?! Usually it's the other way around. What are you smoking? (and why aren't you sharing?)
lol. no seriously I don;t know what the problem is but it works fine if I manualy move the files into the directory one at a time but if I throw them all in at one it messes up and reads some twice. the only explanation I could come up with is that maybe it is reading it a second time before it moves it.
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 05:32 PM
#4
What about keeping track of which onese have bee --- wait... how are you getting the list in the first place.....
-
Nov 19th, 2002, 05:35 PM
#5
Thread Starter
Frenzied Member
VB Code:
set objFS=Server.createobject("Scripting.FileSystemObject")
set objFolder = objFS.GetFolder("D:\inetpub\wwwroot\lxr\AutoRes\import")
for each item in objFolder.Files
strFilePath = item.path
strFilePath = replace(strFilePath, "D:\Inetpub\WWWroot\lxr\AutoRes\import\", "")
strFilePath = "import/" & strFilePath
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objList = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load (Server.MapPath(strFilePath))
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 05:39 PM
#6
What about
1) Keeping track of what's been loaded and only load it once.
or,
2) Adding some sort of For x= 1 to 100000 do nothing loop between files?
-
Nov 19th, 2002, 05:52 PM
#7
Thread Starter
Frenzied Member
I think I'm going to have to work on a 'keeping track' solution... the problem with that is this app is going to be running 24/7 365 and processing alot of files (right now we manualy process 100+ but with this system we hope to do more) so the tracking it may get quite extensive.
this is running on my web server so I think the 'wait loop' would bog it down some.
Michael
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 05:57 PM
#8
What about moving it to a new folder after reading the file?
-
Nov 19th, 2002, 06:06 PM
#9
Thread Starter
Frenzied Member
Re: (ASP & XML) reading files too fast?
Originally posted by msimmons
I'm looping through some xml files, adding (or updating) the data to the database, then moving the file to a different folder.

it seems to be fine now though... I was just writing my 'alert' wrong (oops)
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 06:07 PM
#10
pfffft....
PEBKAC.....sheesh....
-
Nov 19th, 2002, 06:12 PM
#11
Thread Starter
Frenzied Member
Originally posted by techgnome
pfffft....
PEBKAC.....sheesh....
? I don't understand
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
-
Nov 19th, 2002, 08:21 PM
#12
Problem
Exists
Between
Keyboard
And
Chair
in other words, user error.
-
Nov 20th, 2002, 03:34 PM
#13
Thread Starter
Frenzied Member
I just now figured it out... I was writing to the screen what i did with each file when I was done but my logic was a little out of order and i was duplicating what i was writing as I appended
like this
processed file 1
processed file 1
processed file 2
processed file 1
processed file 2
processed file 3
processed file 1
processed file 2
processed file 3
processed file 4
so I was thinking it was processing them like that... sorry to waste your time
I'm off to GalahTech, hope to see you there.
If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|