Thread View: net.database
2 messages
2 total messages
Started by Dave Rasmussen
Thu, 19 Sep 1985 20:16
Multiple DBM databases?
Author: Dave Rasmussen
Date: Thu, 19 Sep 1985 20:16
Date: Thu, 19 Sep 1985 20:16
8 lines
899 bytes
899 bytes
I have an application where I'd like to set up 4 DBM type databases.
However, from looking at the documentation, I assume I would have to
deal with one at a time. Am I correct? Is there a way to 'talk' to
4 of these animals at once besides hacking dbm up?
UUCP: {ihnp4,uwvax!uwmacc}!uwmcsd1!dave
ARPA: uwmcsd1!dave@wisc-rsch.arpa
Re: Multiple DBM databases?
Author: Jeffrey Jongeward
Date: Mon, 23 Sep 1985 22:28
Date: Mon, 23 Sep 1985 22:28
19 lines
1685 bytes
1685 bytes
>
> I have an application where I'd like to set up 4 DBM type databases.
> However, from looking at the documentation, I assume I would have to
> deal with one at a time. Am I correct? Is there a way to 'talk' to
> 4 of these animals at once besides hacking dbm up?
>
> UUCP: {ihnp4,uwvax!uwmacc}!uwmcsd1!dave
> ARPA: uwmcsd1!dave@wisc-rsch.arpa
There is no easy way because of the declaration of pagbuf and dirbuf in dbm.h
(as character arrays), and becuase of a couple of static internal variables in
dbm.c. If you have the source, you can just change the declarations of pagebuf
and dirbuf in dbm.h (to char pointers), change the static internals to external
unique variables, declare some per-database storage for pagebuf and dirbuf, then
switch from one dbm database to the other by saving and restoring the necessary
variables w/in dbm.h + the (old) static internal variables.
I have a set of high-level routines that do just this if you want them (plus a
diff script for dbm), however, it's really a trivial task to write your own.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads