Hi.
I was using a character field to hold boolean data, (Ticked,C,1) in a .dbf database.
I used: if dbf.fields[N].text = 'Y' to find the records I wanted.
Now I've changed the field to Boolean, (Ticked,L) and changed the "Ys" to TRUE.
I can't find out how to do the same search.
I've set the Field definition to ftBoolean and I get a column of tick boxes in the DBFGrid, with ticks where the "Ys" used to be.
As this is no longer a text field I omitted ".text" from the if statement.
Compiling if dbf.fields[N] gives the error:
unit1.pas(56,19) Error: Boolean expression expected, but got "TField".
Compiling if dbf.fields[N] = true; gives the same error.
What is the correct way to do this?
Also, what is the correct way to set and reset the logical status?
Thanks.