>Hi there,
>
>the following lines work fine in the command window but not in code:
>
>select kartei
>set order to istda && Index on logical field
>set key to istda == .F.
>
>Can anybody tell what is wrong with this.
>
>Thanks in Advance
>
>Thomas
The problem is "Set key" is working right:)
What was your intention? To filter the records where istda == .F. ? If so then it would be:
set key to .F.
Otherwise you are using an expression which cannot be predicted.
If current record had istda = .T. then:
istda == .F.
would evaluate to .F. and you'd get istda = .F. records.
If current record had istda = .f. then expression would evaluate to true and you'd get records where istda = .T. This kind of expression based set key might be on purpose and what you wanted.
Cetin