Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine if field entry is unique?
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
How to determine if field entry is unique?
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01143260
Message ID:
01143260
Views:
61
I am refactoring old code (written in VFP 5) that check if user entry is unique in a table.

The table has NO index tags and it is a fairly small table (up to 100 records). The table is opened with Buffering 5.

My code is quire complex. Here is a summary of what it does:

1. Open the same table AGAIN
2. SET FILTER TO THE RECNO() <> nCurrenRecno
3. LOCATE FOR New User Entry.
4. If not found, the entry is unique.

Is there a simpler method to do it in VFP 9 SP1? Without, maybe, opening the table again?

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform