Advantage TDataSet Descendant
Returns the specific type of data stored in a DBF memo field.
type TAdsMemoDataTypes = (mdtMEMO, mdtBINARY, mdtIMAGE );
function AdsGetMemoDataType( strFieldName : String ) : TAdsMemoDataTypes;
|
strFieldName |
Name of the field to check the memo type. |
AdsGetMemoDataType returns the specific type of data stored in a DBF memo field. A type of mdtIMAGE indicates that an image is stored in the DBF memo field. mdtBINARY indicates that some kind of generic binary data is in the DBF memo field. If the DBF field is a standard character memo, the function will return mdtMEMO for pusType. ADT tables cannot store binary and image data in standard character memo fields, so mdtMEMO will always be returned.
AdsTable1.Next;
if ( AdsTable1.AdsGetMemoDataType( 'Notes' ) = mdtMEMO ) then
begin
DBMemo1.DataField := 'Notes';
end;