Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Best way to check for Unique Entries
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00529230
Message ID:
00529258
Views:
14
>Hi - not sure if this should be in the Forms category or here!
>
>What is the best way to check user input to make sure it is unique before allowing the user to continue entering into other fields?

Chris,
One way is in the LostFocus of the field, issue an IndexSeek and see if returns .T.. If so, the value already exists and you can issue a NODEFAULT to prevent the control losing focus.

The same premise could be used with a SQL Select. By default neither technique moves the original record pointer so you don't have to worry about row buffering of the data.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform