Board index » delphi » TField.DataType property doesn't work properly

TField.DataType property doesn't work properly

I have some Paradox table with autoincrement field in D5.
But MyField.DataType for this field returns ftInteger.
It used to work OK in D4.

Dmitry

 

Re:TField.DataType property doesn't work properly


On Thu, 10 Feb 2000 16:56:25 +1100, "Dmitry Stoukov"

Quote
<d.stou...@anprod.csiro.au> wrote:
>I have some Paradox table with autoincrement field in D5.
>But MyField.DataType for this field returns ftInteger.
>It used to work OK in D4.

Works for me. This is how I tested it:

  procedure TForm1.DBGrid1TitleClick(Column: TColumn);
  begin
    case Table1.FieldByName(Column.Fieldname).DataType of
      ftString: Label1.Caption :=   'String';
      ftAutoInc: Label1.Caption :=  'AutoInc';
      ftInteger: Label1.Caption :=  'Integer';
      ftFloat: Label1.Caption :=    'Float';
      ftDate: Label1.Caption :=     'Date';
      ftDateTime: Label1.Caption := 'Timestamp';
    else
      Label1.Caption := 'Other';
    end;
  end;

Have you inspected that table and its fields in the Database Explorer? What
does it indicate the field type is?

(Follow-ups to the newsgroup only, please.)

==========================================================================
Steve Koterski                  "Computers are useless. They can only give
Technical Publications          you answers."
Borland                                       -- Pablo Picasso (1881-1973)
http://www.borland.com/techpubs/delphi

Other Threads