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();

Also See

CloseDatabase, OpenDatabase
 

Contact Ekky Software

All around the world Ekky Software is contactable seven days of the week by submitting the following details.

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript Ekky Software Homepage Texas Business Software ObjectDatabase++ TScript