NewObject

NewObject create a new object buffer for the give table handle.
unsigned int NewObject (
	unsigned int tableID,
	CODBPP::Object *object = NULL,
	unsigned int variableLength = 0
);

Parameters

tableID The table ID defining the table's handle.
object For the returned object addresses
variableLength Optional variable length

Return Values

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

Remarks

Example Use
#define FIRST_TABLE 1
struct Field{
   int first;
   double second;
} *field;
char16_t *str = TEXT("new field value"), *message;
CODBPP::Object object;
if((error = database.BeginTransaction()) == NO_ERROR
&& (error = database.OpenTable(FIRST_TABLE)) == NO_ERROR
&& (error = databse.NewObject(FIRST_TABLE,&object,strlen(str))) == NO_ERROR){
   field = (stuct Field*)object.fixed;
   field->first = 345;
   field->second = 678.9;
   strcpy(object.variable,str);
   if((error = database.AddObject(FIRST_TABLE)) == NO_ERROR)
      error= database.CommitTransaction();
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
   MessageBox(message);
database.EndTransaction();

Also See

AddObject, DeleteObject, ReadObject, RewriteObject
 

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