GetVariableField

GetVariableField return the address of the begining of the variable field requested.
unsigned int GetVariableField (
   unsigned int tableID,
   unsigned int variableField,
   void** returnPosition,
   CODBPP::Object *object = NULL
);
   unsigned int GetVariableField (
   unsigned int tableID,
   unsigned int variableField,
   unsigned int subField,
   unsigned int row,
   void** returnPosition,
	CODBPP::Object *object = NULL
);

Parameters

tableIDthe table ID defining the table's handle.
variableFieldthe position of the variable field, the first variable field is 0.
subFieldthe position of the sub-field within the CODBPP::SUB_TABLE, the first field is 0 whether fixed or variable.
rowthe row for the sub-field required, 0 for the first.
returnPositionpointer for the returned position.
objectenables the user to re-grab the object handles.

Return Values

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

Remarks

Example Use
#define TABLE_ONE 1
struct VariableObject{
   int First;
   double Second;
   enum {FirstVar, SecondVar};
};
char16_t *message;
if(database.BeginTransaction() == NO_ERROR
&& database.OpenTable(TABLE_ONE) == NO_ERROR
&& database.ReadObject(TABLE_ONE,CODBPP::FIRST) == NO_ERROR
&& database.GetVariableField(TABLE_ONE,VariableObject::SecondVar,&message) == NO_ERROR)
   MessagaBox(message);
else if(database.GetErrorMessage(&message) == NO_ERROR) MessageBox(message);
database.EndTransaction();

Also See

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