C++
Java

We create database simply as shown. This should be the first thing that we do before doing anything else.

db_param dpm;
dpm.setTransactionType(DB_TRANSACTION_NONE);
bangdb_database *bdb = bangdb_database::getInstance("mydb", *dpm);
if(!bdb)
{
    printf(""db could not be created, quitting\n");
    //handle the error
}
// DBParam sets the db environment, see the section to know more about it

DBParam is used to set the db environment. It is described as below.

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

DBParam is used to set the db environment. It is described as below.