Advantage TDataSet Descendant
Retrieves the short (two-byte) integer value from the given field.
function TAdsTable.AdsGetShort( const strFieldName: string ): SmallInt;
|
strFieldName |
Name of the field to retrieve. |
CAUTION It is recommended that this Advantage extended method not be used. Please read the Caution About Extended Methods for more information. The suggested native Delphi method to use instead is: TField.AsInteger. See your Delphi documentation for more information about this native Delphi method.
AdsGetShort returns the signed short (2-byte) value stored in the numeric, long integer, short integer, double, CurDouble, short, RowVersion, or auto-increment field. It is possible to either overflow the value or lose decimal precision by using this function. If more precision is desired, use AdsGetDouble. If AdsGetShort is used to retrieve a Money field, the four decimal digits will be rounded to the nearest whole number.
iID := AdsTable1.FieldByName( ‘RecordID’ ).AsInteger;