Class ODBPP::Object

Used to represent a data object index within a table.
class Object{
public:
   unsigned short MSN;
   unsigned int length;
   union{
      unsigned int ID;
      __int64 ID64;
   };
   unsigned char *fixed;
   unsigned char *variable;
};

Members

MSNthe modified sequence number for the current object.
lengththe total length of the object in bytes from the fixed address.
IDthe 32 bit Object ID of the current object within the table handles.
ID64the 64 bit Object ID.
fixedpointer to the start of the fixed data.
variablepointer to the start of the variable data.

Remarks

Example Use
#define FIRST_TABLE 1
CODBPP::Object object;
struct FixedObject{
   int First;
   double Second;
} *fixedObject;
unsigned int error;
char16_t *userName = TEXT("UserName"), *message, buffer[128];
if((error = database.BeginTransaction()) == NO_ERROR
&& (error = database.OpenTable(FIRST_TABLE)) == NO_ERROR
&& (error = database.ReadObject(FIRST_TABLE,
   CODBPP::EQUALTO,&object,1,userName)) == NO_ERROR){
   fixedObject = (struct FixedObject*)object.fixed;
   swprintf(buffer,TEXT("First = %d, Second = %g"),
                 fixedObject->First, fixedObject->Second);
   MessageBox(buffer);
}
if(error && database.GetErrorMessage(&message) == NO_ERROR)
   MessageBox(message);
database.EndTransaction();

Also See

AddObject, ReadObject
Comments (0)Listen All
Characters left: 2500
 

Contact Ekky Software

Thank you for your time and interest.
Ekky Software Customer Support Team.

Ekky Software Product Range
Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript Ekky Software Homepage Ekky Software Homepage ObjectDatabase++ TScript