Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!uhccux!bigtuna!pegasus!tleylan From: tleylan@pegasus.com (Tom Leylan) Newsgroups: comp.sys.ibm.pc.misc Subject: Re: Clipper - SET EXACT , SEEK Message-ID: <1990Dec3.062351.11886@pegasus.com> Date: 3 Dec 90 06:23:51 GMT References: <48680@eerie.acsu.Buffalo.EDU> Organization: Pegasus, Honolulu Lines: 36 In article <48680@eerie.acsu.Buffalo.EDU> v067qklp@ubvmsb.cc.buffalo.edu writes: >Just a quick question for a friend regarding Clipper: > > Does SET EXACT work as it does in DBASEIII+ or has > it been found to be buggy at all? Do all the routines respect > that flag? He's (my friend) getting frustrated complaining that > even with EXACT ON, SEEK is setting FOUND() to true even when > an exact match hasn't been made (e.g. lengths are different). > Danielle, I guarantee that Clipper's SEEK isn't buggy and don't know if it follows dBASE III to the letter but I believe so. The fact is that SET EXACT has no effect on a SEEK. SET EXACT is only used in comparisons and my general rule is to SET EXACT ON at the beginning and leave it that way. One does not want to wonder about the switch setting when comparing two strings. The reason that your friend is finding the record is most likely that they are trimming the key. The comparison is made up until the SEEK key is exhausted and at that point you have a match. Keep the length of the variable being SOOKEN (some sort of perverted future-tense of SEEK) the same length as the field in the index expression. Note (not that you asked) that SET SOFTSEEK can be switched on and off to alternatively set you at the correct record (if present) or at the next record beyond the key (if not present). An alternative if you want to put the user "close". As a parting note, I prefer to trim the SEEK string when the user has keyed it in since they may not know the entire name and that allows them to type up until they aren't sure. In a process of some sort that wouldn't be advisable of course so just use my padding suggestion. tom leylan former Senior Systems Analyst - Nantucket Corporation