Board index » delphi » Locate, LocateNext - help required please
Nick Barkwort
![]() Delphi Developer |
Wed, 09 Jul 2003 17:56:00 GMT
|
Nick Barkwort
![]() Delphi Developer |
Wed, 09 Jul 2003 17:56:00 GMT
Locate, LocateNext - help required please
Delphi 5.01 Pro
IBX 4.3 IB 6 I'm trying to implement a simple locate, locate next procedure for a grid. I can get the app to locate the first record using : If Not(SQLDataSet.LocateNext('DISPLAYAS',edSearchText.Text , However when I click the button to look for other matches, it brings up the Could anyone help me by posting a code snippet that successfully implements Many Thanks Nick |
Robert F. Tulloc
![]() Delphi Developer |
Wed, 09 Jul 2003 23:52:23 GMT
Re:Locate, LocateNext - help required pleaseHi: If the table is indexed on the field you are searching, then they will be in order Best regards |
Nick Barkwort
![]() Delphi Developer |
Thu, 10 Jul 2003 01:36:24 GMT
Re:Locate, LocateNext - help required pleaseThanks for taking the time to reply. The DataSet is a combination of two tables combined - one full of addresses and one full of people who live in those addesses. The field I'm searching 'DISPLAYAS' is in the people table and has an index for it which shows the data in A-Z order by name. I can see the records in the grid in the correct A-Z order. However once Smith, Bill <-------stops at the first and will not move to the next If you have successfully used Locate/LocateNext could you provide an example Many thanks in advance. Nick "Robert F. Tulloch" <tult...@ibm.net> wrote in message Quote> Hi: |
Robert F. Tulloc
![]() Delphi Developer |
Thu, 10 Jul 2003 08:42:02 GMT
Re:Locate, LocateNext - help required pleaseHi: Quote> Smith, Bill <-------stops at the first and will not move to the next Very confusing. Either it is the next record in a grid or the next record to scroll Find next would be useful if you were looking for street names in a table indexed on Best regards |
Nick
![]() Delphi Developer |
Thu, 10 Jul 2003 17:22:45 GMT
Re:Locate, LocateNext - help required pleaseI was using Smith as a test to make sure my code worked. There are other fields such as CompanyName where partial seaches would be However I'm open to suggestions, how would you use Find Next? Cheers Nick "Robert F. Tulloch" <tult...@ibm.net> wrote in message Quote> Hi: |
Nick Barkwort
![]() Delphi Developer |
Thu, 10 Jul 2003 17:29:46 GMT
Re:Locate, LocateNext - help required pleaseI was using Smith as a test to make sure my code worked. There are other fields such as CompanyName where partial seaches would be However I'm open to suggestions, how would you use Find Next? Cheers Nick "Robert F. Tulloch" <tult...@ibm.net> wrote in message Quote> Hi: |
Robert F. Tulloc
![]() Delphi Developer |
Fri, 11 Jul 2003 02:42:05 GMT
Re:Locate, LocateNext - help required pleaseHi: What if the word they can remember is Company? Just joking. I worked in Indonesia My understanding of partial key: Joes Fast Diner is the key. Locate Fast will not find Joes Fast. Someone can correct me if I am wrong. Your looking for a word "contained" somewhere |
Nick Barkwort
![]() Delphi Developer |
Fri, 11 Jul 2003 03:30:44 GMT
Re:Locate, LocateNext - help required pleaseThat's right maybe the user could be looking for in the company name field but only remember part of the company name which is why I opted for If Not(SQLDataSet.LocateNext('DISPLAYAS',edSearchText.Text , because of the loPartialKey would pick up 'Joe Plumbing Sevices' if the user At the end of the day this feature is not crucial, it's just handy; I use to Perhaps my understanding of Locate/LocateNext is wrong and I'm not using it If someone could set me straight I would be very grateful. Thanks again Nick "Robert F. Tulloch" <tult...@ibm.net> wrote in message Quote> Hi: - Hide quoted text - - Show quoted text - Quote> in the field. |
Craig Stunt
![]() Delphi Developer |
Fri, 11 Jul 2003 22:35:43 GMT
Re:Locate, LocateNext - help required pleaseQuoteNick Barkworth wrote: HTH, -Craig -- Delphi/InterBase weblog: http://delphi.weblogs.com |
Nick Barkwort
![]() Delphi Developer |
Sat, 12 Jul 2003 00:15:22 GMT
Re:Locate, LocateNext - help required pleaseThe code attached to the button is: If Not(SQLDataSet.LocateNext('DISPLAYAS',edSearchText.Text , I only used FindNext to see if I could move things along, after the above If you have successfully implemented a Locate/LocateNext procedure could you Many thanks for taking the time to help. Nick Quote----- Original Message ----- |
Craig Stunt
![]() Delphi Developer |
Sat, 12 Jul 2003 01:07:07 GMT
Re:Locate, LocateNext - help required pleaseQuoteNick Barkworth wrote: LocateNext starts looking at the *current record.* So if you're HTH, -Craig -- Delphi/InterBase weblog: http://delphi.weblogs.com |
Team
![]() Delphi Developer |
Sat, 12 Jul 2003 02:08:29 GMT
Re:Locate, LocateNext - help required pleaseQuoteCraig Stuntz wrote: Quote> HTH, Jeff Overcash (TeamB) | Talk about failure (Please do not email | To fall is not to fail me directly unless | Failure isn't about falling down asked. Thank You) | Failure is staying down (Marillion) |
Nick Barkwort
![]() Delphi Developer |
Sat, 12 Jul 2003 06:27:13 GMT
Re:Locate, LocateNext - help required pleaseThanks Craig I used 'Next' as you suggested and it did the trick. Thanks again, as you can imagine these sort of little problems can be the Nick Quote"Craig Stuntz" <cstuntz@no_spam.vertexsoftware.com> wrote in message Quote
|
Craig Stunt
![]() Delphi Developer |
Sat, 12 Jul 2003 06:48:05 GMT
Re:Locate, LocateNext - help required pleaseQuoteNick Barkworth wrote: this "fix" after the next IBX update. I actually prefer the way it works now, but I can live with it either -Craig -- Delphi/InterBase weblog: http://delphi.weblogs.com |
1. TTcpServer please help me oh, PLEASE PLEASE PLEASE HELP ME
3. Please Help external sorting routines required
4. HELP REQUIRED PLEASE !!!!!!!!
5. Please Help Me - SQL Required Files
6. Help urgently required please.
9. Ex Paradox requires Delphi Help PLEASE !
10. SQL editor with additional features required - please help.