Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek - not exact search? What does influence on it?
Message
 
 
To
04/01/2000 14:42:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00312453
Message ID:
00312707
Views:
16
Hi Mike & Jim,

>>The safest way to enforce exact matching is;
>>? SEEK(PADR("111",LEN(hhh),"0"), "hhh","code")
>
>"hhh" is the table name (second paremeter), the third parameter is that index tag, you would have to get the expression from the tag (I think its KEY(TAGNO(tag))), and base your LEN() on that.

In my validate() method I place this code:
lparameter lcValue && character value to check
local lcOldExact
lcOldExact=set('exact') && Save current settings
set exact on && To perform exact match
if !empty(this.CursorName) and !empty(lcValue) and type('lcValue')='C' && Character field
   if seek(lcValue,this.CursorName, 'Code') && Check if it's duplicate
   		=messagebox('There is a duplicate! '+lcValue+ ' will not be added!',48,'Warning')
   		return .f.
   endif
endif   
set exact &lcOldExact && Restore old settings
return .t.
There lcValue is already alltrimed.
Why do you think it's not good enough?

At least, as I ckecked it, it worked...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform