Link to home
Start Free TrialLog in
Avatar of TommyMac501
TommyMac501

asked on

How do I seek past 3,618,340 records?

We have a custom File Viewing application, we've had it running fine for over 10 years (VB 6).  We received a file of 4,814,889 records the other day and the viewer bombs.  We can seek up to record 3,618,339, but if we move past that, we get a "seek error".  This program accesses flat text file, using SetFilePos to position the pointer, then a GET to get the record.  We arrive at the record position by multiplying the record length times the record number + the existion record position.

I would imagine it's a limitation with the file access capability in VB 6 (we're running on XP Pro).  Does anyone have a workaround (besides rewriting it)??  The variables holding the Record count, Record Length and Record position are all defined as Double.

TM
Avatar of moorhouselondon
moorhouselondon
Flag of United Kingdom of Great Britain and Northern Ireland image

Write a utility to chop up the text file would be the simplest work-around in my view.
ASKER CERTIFIED SOLUTION
Avatar of Zoppo
Zoppo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TommyMac501
TommyMac501

ASKER

Well, I remember solving this same problem in the past by referencing the VBA library and using the filestream objects, but I can't for the life of me find the library to reference.  Every time I try and replace the VBA reference with a more current one, I get an error "library in use"  or something along those lines.