next up previous contents
Next: SetPrecision Up: General Methods Previous: SetFlags

GetDataType

NAME GetDataType

PROTOTYPE

#include "SSTable.h"

int SSTable::GetDataType(int colIndex);

EXAMPLE

#include "SSTable.h"

SSTable * pTable = new SSTable();

... // do table maniputation 

for (int i = 0; i < pTable->GetNumColumns(); i++) {
  int dt = pTable->GetDataType(i);
  switch (dt) {
    case SSTable::DT_STRING: ...; break;
    case SSTable::DT_INTEGER: ...; break;
    case SSTable::DT_DOUBLE: ...; break;
    default: ...; break;
  }
}
PURPOSE

GetDataType returns the datatype code for a column.

RECEIVES

colIndex The index of the column in question

RETURN VALUE

A negative value indicates an error or warning.

REMARKS

See also: Column Option Constants



Olivera Tosic
12/17/1999