Results 1 to 13 of 13

Thread: (ASP & XML) reading files too fast? **Resolved**

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    (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.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    ***?!
    Too fast?! Usually it's the other way around. What are you smoking? (and why aren't you sharing?)

    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    What about keeping track of which onese have bee --- wait... how are you getting the list in the first place.....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    VB Code:
    1. set objFS=Server.createobject("Scripting.FileSystemObject")
    2. set objFolder = objFS.GetFolder("D:\inetpub\wwwroot\lxr\AutoRes\import")
    3.  
    4. for each item in objFolder.Files
    5.     strFilePath = item.path
    6.     strFilePath = replace(strFilePath, "D:\Inetpub\WWWroot\lxr\AutoRes\import\", "")
    7.     strFilePath =  "import/" & strFilePath
    8.  
    9.     Set objXML = Server.CreateObject("Microsoft.XMLDOM")
    10.     Set objList = Server.CreateObject("Microsoft.XMLDOM")
    11.     objXML.async = False
    12.     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.

  6. #6
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    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?
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  7. #7

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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.

  8. #8
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    What about moving it to a new folder after reading the file?
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  9. #9

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    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.

  10. #10
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    pfffft....
    PEBKAC.....sheesh....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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.

  12. #12
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Problem
    Exists
    Between
    Keyboard
    And
    Chair

    in other words, user error.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  13. #13

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    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
  •  



Click Here to Expand Forum to Full Width