GetDatabaseMembers

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

Parameters

memberspointer to a valid memory block.
countif 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

Example Use
char16_t *message;
CODBPP database
CODBPP::DatabaseMembers *members;
unsigned int count;
if((error = database.OpenDatabase(TEXT("YourDatabase"))) == NO_ERROR
&& (error = database.BeginTransaction()) == NO_ERROR
&& (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

CreateTable
Comments (0)Listen All
Characters left: 2500
 
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript