Arrays and Binary File Access
This project demonstrates how to use a dynamic array to interact with database records and settings stored in a single binary file.
The example stores custom settings and the record count at the beginning of the binary file, then stores multiple database records. To retrieve the data, it gets the settings and record count, then loads the records into a dynamic array which can be interacted with on the form, much like a true database record. I needed a custom database format to store large, variable-length fields of data with a lot of symbol-type characters and still keep the packaged application smaller than 2Mb!
This code has been updated! I added a progress bar, streamlined the arrays (it's no longer using multidimensional arrays) and now it has progress bar support to show loading, saving and function progress. Any comments are welcome! I'm in the process of converting this project (with some major enhancements) to a class module to handle the routines. If you want to join this little project, post a message below. Depending on response, this may be developed into a complete flat-file database class (I'm getting tired of redistributing megabytes of DAO/ADO supports just to store a few dozen records). Don't forget to vote!
Original Author: Jim Hunt
Assumptions
This project was created in VB6 (SP5). I'm sure with very few modifications, it can be used in VB4&5.
Side Effects
This type of data access shouldn't be used for anything over 5,000 records or so. It just doesn't have the kind of performance (yet).
About this post
Posted: 2002-06-01
By: ArchiveBot
Viewed: 103 times
Categories
Attachments
Arrays and20890692001.zip
Posted: 9/3/2020 3:45:00 PM
Size: 15,136 bytes
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.