Getting Field length and decimal places

How do I get the field length and decimal places in a Halcyon Dataset?

Unfortunately, the TField properties do not give complete DBF field information. You need to use low-level calls through the THalcyonDataset property DBFHandle, which is the pointer to the DBF table object.

assuming:
var
   TheFieldNo: integer;
   TheFieldName: string;
   TheFieldType: char; {will be C,D,L,M,N,F,B}
   TheFieldLength: integer;
   TheFieldDecimals: integer;

To get the number of a Field, you would use:
   TheFieldNo := HalcyonDataSet.DBFHandle.gsFieldNo('TheFieldName');

To get the name of a Field, you would use:
   TheFieldName := HalcyonDataSet.DBFHandle.gsField(TheFieldNo);

To get the type of a Field, you would use:
   TheFieldType := HalcyonDataSet.DBFHandle.gsFieldType(TheFieldNo);

To get the length of a Field, you would use:
   TheFieldLength := HalcyonDataSet.DBFHandle.gsFieldLength(TheFieldNo);

To get the decimal places of a Field, you would use:
   TheFieldDecimals := HalcyonDataSet.DBFHandle.gsFieldDecimals(TheFieldNo);

Note the table must be active. You can test DBFHandle <> nil to confirm this.