Click here to download BDB 1.86 for Windows
First of all, it's free - because it's under the BSD license, unlike the more recent Sleepycat releases, it can be used without paying the high fees for commercial use. Secondly, it supports databases that are many megabytes in size. Finally, it's fast, has a reasonable memory footprint (being written in the early 90's), lets you use a .DB file as an on-disk hash database, and it's quite portable.
Berkely DB 1.85 is slightly outdated and has bugs, so 1.86 is the next free version before the non-BSD license.
The only version of BDB 1.86 that is available, has a bug in the implementation. It assumes a Unix environment, and so unless specifically asked not to do so, opens all binary files in text mode (fopen with parameter of 'r' instead of 'rb', and 'w' instead of 'wb')! This results in a problem. If you fill the DB file to a size of around 300kb, in one case, it refuses to let you write any more data to it. This makes you think that the database size limit is 300kb. Not so! It's just that a sequence of 0Dh and 0Ah is being messed up to become 0Ah (or something like that).
When you call dbopen, the flags in the 2nd parameter should include: "O_BINARY", or 0x8000. Add this to the normal flags, and your DB will be opened properly.