TAdsTable.AdsGetFieldLength

Advantage TDataSet Descendant

Retrieves length of a field in a table.

Syntax

function AdsGetFieldLength( strFieldName : String ) : Longint;

Parameter

strFieldName

Name of field.

Description

AdsGetFieldLength returns the length of the field in bytes. For memos, binary fields, and variable-length character fields, this function will return the length of the portion stored in the record rather than the actual data length.

Example

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 );

See Also

AdsGetBinaryLength

AdsGetFieldDecimals

AdsGetFieldName

AdsGetFieldNum

AdsGetFieldType

AdsGetMemoLength

AdsGetNumFields