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


tableIDthe table ID defining the table's handle.
objectfor the returned object addresses.
variableLengthOptional variable length

Return Values

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


Example Use
#define FIRST_TABLE 1
struct Field{
   int first;
   double second;
} *field;
char16_t *str = u"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,wcslen(str))) == NO_ERROR){
   field = (stuct Field*)object.fixed;
   field->first = 345;
   field->second = 678.9;
   if((error = database.AddObject(FIRST_TABLE)) == NO_ERROR)
      error= database.CommitTransaction();
if(error && database.GetErrorMessage(&message) == NO_ERROR)

Also See

AddObject, DeleteObject, ReadObject, RewriteObject
Comments (0)Listen All
Characters left: 2500
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript