
Blazingly Fast VB4/32 Binary Database Example
The problem with Jet databases are:
* large run-time libraries you must distribute.
* setup programs from other companies (including Microsoft sometimes)
having your app's Jet run-time libraries for lunch.
* slow speed; no performance advantage until you get a database of about
5,000 records or must do very advanced queries.
One alternative is text ISAM databases so you can use ODBC. Guess what--you
must distribute Jet DLLs with this and it's slightly faster than straight
Access MDB, but only until you get to about 5,000 records or must do very
advanced queries. With 16-bit VB (3.0 and 4.0), you must distribute a
special INI file you must write. What is not explained very well, however,
is that with 32-bit VB (4.0 and up), text ISAM support must use special
registry entries that are poorly documented in the KB.
Another alternative is a third-party OCX or DLL. With this, look at long
ramp-up time understanding the APIs, bugs you can't fix, slow to load speed
(in some cases), and OCXs that you must now distribute with your app. If
you've been doing VB 4/32 for awhile, if it takes 5 hours to write a code
example and 1 hour to implement an OCX, go with the code example every time
because you never know when you have an OCX distribution problem. Murphy's
law will tell you that the less OCX files you distribute, the better off
you will be.
It came to me after I awoke from a dream. It took two days to write. I
never thought I'd make it because usually when I play with file bytes, I
get mired in hours of complexity.
I coded a blazingly fast VB4/32 binary database example that supports
variable length records and uses a unique technique for looking up
records--the index file is an INI file. It's amazingly stable. It has a
fast compaction method too. I'm looking for public ftp space for it (9K
zipped) for the next 5 years so that the rest of the world can enjoy it. If
you know of a space, please email me.
Otherwise, if you are interested in this example, email me and I will email
it back to you.
What I don't give you, but I explain how you can add on:
* binary sort
* SQL query
* record search
* encryption