Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with set key
Message
From
12/09/2006 07:34:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01152943
Message ID:
01152967
Views:
25
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform