ctdbGetFieldPrecision
Retrieve the field precision.
Declaration
NINT ctdbGetFieldPrecision(CTHANDLE Handle)
Description
ctdbGetFieldPrecision() retrieves the field precision. The field precision represents the total number of digits in a BCD number.
Returns
ctdbGetFieldPrecision() returns the field precision (maximum number of digits).
CT_MONEY:
Based on a four-byte signed integer, the maximum value for CT_MONEY is 21474836.47, which gives it a precision of 9 and a scale of 2 (although it appears to be 10 digits, values over precision 9 are not entirely within the boundaries). If you call ctdbGetFieldPrecision() on such a field, it returns 9 by definition.
See also
ctdbGetField(), ctdbGetFieldLength(), ctdbGetFieldName(), ctdbGetFieldNullFlag(), ctdbGetFieldScale(), ctdbSetFieldPrecision()