Results 1 to 6 of 6

Thread: specialized techniques :)

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Posts
    81

    Red face specialized techniques :)

    are the any specialized techniques for opening 120 MB txt files in VB

    when i try, it hangs, or seems to hang.

    i can open up a 300 KB file using the same code.

    thanx ;P
    ----------------------------------------
    ÖÖ two hungry cookie monsters

  2. #2
    Fanatic Member
    Join Date
    Sep 2000
    Posts
    770
    Yes, its's called buffering. You can buffer a defined sized block of memory (lets say 1 MB) and parse though your data, when you get close to the end you can buffer in another 1 MB block. This may not work if for some reason you need to entire file in memory (generally, you can make it work)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Nov 2003
    Posts
    81

    Smile re :)

    can you give me some code that puts buffering into use??
    ----------------------------------------
    ÖÖ two hungry cookie monsters

  4. #4
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    tell me one thing :

    Does it hange when u open the file or u start reading it...

    I think it should not hange when u just open the file...
    Regards

  5. #5
    Lively Member
    Join Date
    Jan 2000
    Location
    Neenah, WI USA
    Posts
    95
    Make sure that each line has a cr/lf at the end of it. I have the same problems periodically with files I ftp from a server to a pc. If they don't have the proper end of line characters, the program tries to read in the entire file as one line. Then it hangs.
    Sometimes re-ftp'ing it and changing the type from binary to ascii (or vice versa) fixes it.
    Steve

  6. #6
    Hyperactive Member sw_is_great's Avatar
    Join Date
    Nov 2003
    Posts
    330
    I donnt think thats a problem.. binary files donnt have new line......

    its unclear if it hangs while opening the file or reading from the file......

    in my openion it should not hange while opening the file.I have worked in applications(in Unix and in C) where we open files size of GB.
    Regards

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