CreateDatabase
CreateDatabase creates a new ObjectDatabase Control file (*.odc) that contains all the information required control all the tables and transactions within the database.unsigned int CreateDatabase ( const char16_t* controlFileName );
Parameters
| controlFileName | '\0' terminating string that contains the required path for the control file. |
Return Values
If the method succeeds, the return value is zero else see error codes for more details.Remarks
- This methos also opens the database for use.
Example Use
char16_t *message;
CODBPP database;
CODBPP::Schema schema;
//init table schema to your requirements
if((error = database.CreateDatabase(TEXT("C:\\YourDatabase"))) == NO_ERROR
&& (error = database.BeginTransaction(CODBPP::EXCLUSIVE)) == NO_ERROR
&& (error = database.CreateTable(&schema)) == NO_ERROR){
...
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
MessageBox(message);
database.EndTransaction();

