Database – Embedded

C++
SelectedJava
SelectedWe create database simply as shown. This should be the first thing that we do before doing anything else.
DBParam dp; dp.setTransactionType(DB_TRANSACTION_NONE); BangDBDatabase *bdb = new BangDBDatabase("mydb", &dpm); if(!bdb) { printf("db could not be created, quitting\n"); // handle error, possibly return from here } // db_param sets the db environment, see the section to know more about it
We create database simply as shown. This should be the first thing that we do before doing anything else.
DBParam dp; dp.setTransactionType(DB_MULTIOPS_TRANSACTION_NONE); BangDBDatabase bdb = new BangDBDatabase("mydb", dp); if(bdb == null) { System.out.println("db could not be created, quitting"); // handle error, possibly return from here } // DBParam sets the db environment, see the section to know more about it