GetTableSchema

GetTableSchema returns the table schema of an open table.
unsigned int GetTableSchema (
	unsigned int tableID,
	CODBPP::Schema *schema,
	unsigned int *length = NULL
);

Parameters

tableID The table ID defining the table's handle.
schema Pointer the the memory for the returning schema, NULL if unknown
length The length of memory in bytes required to fit the table schema

Return Values

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

Remarks

Example Use
int length;
char16_t *message;
CODBPP database;
CODBPP::Schema *schema;
if((error = database.OpenDatabase(TEXT("YourDatabase"))) == NO_ERROR
&& (error = database.BeginTransaction(CODBPP::EXCLUSIVE)) == NO_ERROR
&& (error = database.OpenTable(1)) == NO_ERROR
&& (error = database.GetTableSchema(1,NULL,&length)) == NO_ERROR
   schema = (CODBPP::Schema*) new BYTE[length];
   if((error = database.GetTableSchema(1,schema)) == NO_ERROR){
      ...
   }
   delete [] (LPBYTE)schema;
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
   MessageBox(message);
database.CloseDatabase();

Also See

CreateTable, SetTableSchema
 

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