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
tableID | the table ID defining the table's handle. |
variableField | the position of the variable field, the first variable field is 0. |
subField | the position of the sub-field within the CODBPP::SUB_TABLE, the first field is 0 whether fixed or variable. |
row | the row for the sub-field required, 0 for the first. |
returnPosition | pointer for the returned position. |
object | enables 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, PutVariableValuesListen All
Comments (0)