GetDatabaseMembers

GetDatabaseMembers returns all the tables currently within the control file.
unsigned int GetDatabaseMembers (
	CODBPP::DatabaseMember *members,
	unsigned int *count
);

Parameters

members Pointer to a valid memory block.
count If members equal NULL then count equals the size of the reqiured memory block in bytes. Else count equals the amount of members.

Return Values

If the method succeeds, the return value is zero else see error codes for more details.

Remarks

  • This method requires you to begin a transaction in order to prevent any other process from changing the database while this is progress.
Example Use
char16_t *message;
CODBPP database
CODBPP::DatabaseMembers *members;
unsigned int count;
if((error = database.OpenDatabase(TEXT("YourDatabase"))) == NO_ERROR){
   if((error = database.BeginTransaction()) == NO_ERROR){
      if((error = database.GetDatabaseMembers(NULL,&count)) == NO_ERROR){
         members = (CODBPP::DatabaseMembers*) new BYTE[count];
         if((error = database.GetDatabaseMembers(members,&count)) == NO_ERROR){
            for(int i = 0; i < count; i++) MessageBox(members[i].tableName);
         }
         delete [] (LPBYTE)members;
      }
   }
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
   MessageBox(message);
database.CloseDatabase();

Also See

BeginTransaction
 

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