GetVariableField

GetVariableField return the address of the begining of the variable field requested.
unsigned __int64 GetVariableField (
   unsigned int tableID,
   unsigned int variableField,
   void** returnPosition,
   CODBPP::Object *object = NULL
);
unsigned __int64 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
  • C++
#include "ODBPP.h"

#define TABLE_ONE 1

struct VariableObject{
   int First;
   double Second;
   enum {FirstVar, SecondVar};
};

int wmain(int argc, wchar_t* argv[])
{
   const char16_t *message;
   CODBPP database;
   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();
   return NO_ERROR;
}

Also See

ReadObject, PutVariableValues
Listen All
Comments (0)
Characters left: 2500
 
Ekky Software Homepage T-Accounts Online ObjectDatabase++ TScript Ekky Software Homepage T-Accounts Onlinee ObjectDatabase++ TScript