Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date function
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
01630218
Message ID:
01630219
Views:
79
Does the set key set a filter to today's date?

If not what does it do?


From the VFP help file:

Specifies access to a range of records based on their index keys.



SET KEY TO [eExpression1 | RANGE eExpression2 [, eExpression3]]

[IN cTableAlias | nWorkArea]



Parameters
eExpression1
Allows access to a set of records with identical index keys. eExpression1 is a single index key value. All records with index keys that match eExpression1 are accessible.

RANGE eExpression2[, eExpression3]
Allows access to a set of records with index keys that fall within a range of index key values. eExpression2 allows access to records with index keys equal to or greater than eExpression2. eExpression3 (preceded by a comma) allows access to records with index keys equal to or less than eExpression3. Including both eExpression2 and eExpression3 (separated by a comma) allows access to records with index keys equal to or greater than eExpression2 and equal to or less than the eExpression3.

For example, the CUSTOMER table includes a character field containing postal codes. If the table is indexed on the postal code field, you can specify a range of postal codes with SET KEY.

In the following example, only records with postal codes falling within the range of 40000 to 43999 appear in a Browse window
Previous
Reply
Map
View

Click here to load this message in the networking platform