Hi,
You need (2):
Quote:
(2) index_ttls->set_flags( DB_DUP ) first, followed by index->open( )
with flags DB_CREATE. |
except that:
* you want DB_DUPSORT, not just DB_DUP
* you need to make sure that the database does not exist when you call
index->open. In other words, the database file must be deleted before
you create it with duplicates.
If you are sure that you are creating the database from scratch and the
open call is still failing with an invalid argument exception, make
sure that the error log is enabled (with DB_ENV->set_errfile), and see
whether there is more information about what is going wrong.
Quote:
I am wrapping this db and
indices (there are 3) in a class. I have specified the callbacks for
the key extractors for each of the indices as static members functions
of the class. This wouldnt be the problem would it? |
That sounds fine and shouldn't cause any problems.
Michael.