Advantage TDataSet Descendant
Retrieves decimals (for numerics) of a field in a table.
function AdsGetFieldDecimals( strFieldName : String ) : Word;
|
strFieldName |
Name of the field. |
AdsGetFieldDecimals returns the number of digits of decimal precision in the field to the right of the decimal point in a numeric field.
AdsTable1.Active := TRUE;
{ retrieve field information }
lFieldLength := AdsTable1.AdsGetFieldLength( 'LastName' );
wFieldDecimals := AdsTable1.AdsGetFieldDecimals( 'LastName' );
lFieldOffset := AdsTable1.AdsGetfieldOffset( 'LastName' );
eFieldType := AdsTable1.AdsGetFieldType( 'LastName' );
wFieldNum := AdsTable1.AdsGetFieldNum( 'LastName' );
{ get the successive field's name }
strFieldName := AdsTable1.AdsGetFieldName( wFieldNum + 1 );