Results 1 to 12 of 12

Thread: Binary Get# causes overflow on 10gb files [resolved]

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    3

    Thumbs up Binary Get# causes overflow on 10gb files [resolved]

    Hi all,

    I'm trying to use Binary Access to read a large 10gb file, by moving, and reading to an exact point in the file, using the Get# function.

    The Get# uses a Long as its position parameter, to specify where to move to in the file. This naturally causes issues accessing large files past the point of ~2.1gb, and returns an Overflow error.

    Is there an alternative approach i can take, to read X characters, from a specific point in a file, and return a string? An API call perhaps?

    Whatever the alternative, it needs to be lightning fast, to directly move to that point in the file instantaneously.

    I've been searching the net/msdn/etc for a few hours now, with no luck.

    I've seen approaches of splitting the file, then reading it, but this wont work, as the below code takes place thousands of times, and needs to happen fairly quickly (few ms per read). The below approach is ultra fast, and does the trick, when dealing with under 2.1gb files, but we need to handle up to 10gb.

    Any help really appreciated!

    current approach:
    Open strFileName For Binary Access Read As #lngFNum
    strData = Space$(4000)
    Get #lngFNum, dblPos, strData
    Last edited by AaronColvin; Sep 9th, 2005 at 12:04 AM. Reason: resolved

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