Advantage TDataSet Descendant
Retrieves the offset of a field in a table.
function AdsGetFieldOffset( strFieldName : String ) : Longint;
|
strFieldName |
Name of the Field. |
Returns the offset of the field in the table’s record image.
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 );