This example uses CreateDatabase to create a new, encrypted Database object. The example enumerates the properties of the new database, and then closes it.
See How to Build the DAO Method Samples.
If you have installed the DAO SDK, see InstallDirectory\DAOSDK\SAMPLES\CreateDatabase.cpp.