Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 8 of 8 total |
FindKey not working |
Wed, Jun 28 2006 5:38 PM | Permanent Link |
Michael Fullerton | DBISAM 3.3
Delphi 5 I have a table with a case-insensitive index called PLU that indexes one field, PLU. When I set the .IndexName to 'PLU' and do a findKey it does not locate the record even though the text does exist in the table's PLU field. Any ideas why FindKey is not working? ___ Free Project Time Tracker for Delphi Developers http://www.cyber-matrix.com/pcdelphi.html |
Thu, Jun 29 2006 3:45 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Michael
Do you have a filter set? Roy Lambert |
Thu, Jun 29 2006 6:45 AM | Permanent Link |
Michael Fullerton | On Thu, 29 Jun 2006 08:42:43 +0100, Roy Lambert
<roy.lambert@skynet.co.uk> wrote: >Do you have a filter set? No. ___ Free Project Time Tracker for Delphi Developers http://www.cybermatrix.com/pcdelphi.html |
Thu, Jun 29 2006 1:50 PM | Permanent Link |
Sean McCall | Michael,
Is the value passed to FindKey an exact case-insensitive match for what you are looking for? If your values are: # PLU - --- 1 AA 2 BB 3 CA 4 CB 5 CC Assuming no filters, ranges, or OnFilter events, and a case insensitive index is active on PLU: FindKey(['C']) will not move the cursor FindNearest(['C']) will move to record 3 FindKey(['CB']) will move to record 4 FindKey(['ca']) will move to record 3 Have you tried this in a test project with the only code being to open the table and do a findkey? If you are using findkey correctly and can duplicate the problem in a test project, you can post both the project code & table to the binaries newsgroup and maybe someone here can figure it out. Also, verify the table to make sure you do not have a corrupt index. HTH, Sean Michael Fullerton wrote: > DBISAM 3.3 > Delphi 5 > > I have a table with a case-insensitive index called PLU that indexes > one field, PLU. When I set the .IndexName to 'PLU' and do a findKey it > does not locate the record even though the text does exist in the > table's PLU field. Any ideas why FindKey is not working? > > ___ > Free Project Time Tracker for Delphi Developers > http://www.cyber-matrix.com/pcdelphi.html |
Thu, Jun 29 2006 3:13 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Michael,
<< I have a table with a case-insensitive index called PLU that indexes one field, PLU. When I set the .IndexName to 'PLU' and do a findKey it does not locate the record even though the text does exist in the table's PLU field. Any ideas why FindKey is not working? >> I would a) verify the table and then b) make sure that the text doesn't have any odd spaces or characters in it that may be affecting the indexing/searching. Sometimes NULL characters get inserted into text and they really screw up searching, etc. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Jun 29 2006 3:15 PM | Permanent Link |
Michael Fullerton | On Thu, 29 Jun 2006 13:47:33 -0400, Sean McCall <NoSpam@nowhere.com>
wrote: >Michael, > >Is the value passed to FindKey an exact case-insensitive >match for what you are looking for? If your values are: > > ># PLU >- --- >1 AA >2 BB >3 CA >4 CB >5 CC > >Assuming no filters, ranges, or OnFilter events, and >a case insensitive index is active on PLU: > >FindKey(['C']) will not move the cursor >FindNearest(['C']) will move to record 3 >FindKey(['CB']) will move to record 4 >FindKey(['ca']) will move to record 3 I was basically trying to do: FindKey(['c']) but FindKey(['C']) also did not work When I use the full text (FindKey(['cb'])) it does work just fine. >Have you tried this in a test project with the only code >being to open the table and do a findkey? If you are using >findkey correctly and can duplicate the problem in a test >project, you can post both the project code & table to the >binaries newsgroup and maybe someone here can figure it out. >Also, verify the table to make sure you do not have a >corrupt index. > > >HTH, > >Sean > > >Michael Fullerton wrote: >> DBISAM 3.3 >> Delphi 5 >> >> I have a table with a case-insensitive index called PLU that indexes >> one field, PLU. When I set the .IndexName to 'PLU' and do a findKey it >> does not locate the record even though the text does exist in the >> table's PLU field. Any ideas why FindKey is not working? >> >> ___ >> Free Project Time Tracker for Delphi Developers >> http://www.cyber-matrix.com/pcdelphi.html ___ Free Project Time Tracker for Delphi Developers http://www.cybermatrix.com/pcdelphi.html |
Thu, Jun 29 2006 3:37 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>I would a) verify the table and then b) make sure that the text doesn't have >any odd spaces or characters in it that may be affecting the >indexing/searching. Sometimes NULL characters get inserted into text and >they really screw up searching, etc. And don't forget control characters - invisible in normal controls Roy Lambert |
Thu, Jun 29 2006 3:52 PM | Permanent Link |
Sean McCall | Sounds like what you want is FindNearest. FindKey is used to
find an exact match only. Sean > I was basically trying to do: > FindKey(['c']) > but > FindKey(['C']) also did not work > > When I use the full text (FindKey(['cb'])) it does work just fine. > |
This web page was last updated on Saturday, April 27, 2024 at 08:52 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |