FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour seek and string searching
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
seek and string searching
Posted: Fri Apr 14, 2006 10:58 PM
I can not find seek works probably with strings !!

   if MsgGet( "Search", "Customer Appreviation", @V_CU_appr,;
              "..\bitmaps\lupa.bmp" )
      select 1
      use cust
      set index to cust10
      if ! DbSeek( alltrim(upper(V_CU_Appr )))
         MsgAlert( "I don't find that customer" )
         GO nRecNo
      else
         oLbx:UpStable()           // Corrects same page stabilizing Bug
         oLbx:Refresh()            // Repaint the ListBox
      endif
   endif
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Re: seek and string searching
Posted: Thu Apr 20, 2006 06:39 PM
Ehab Samir Aziz wrote:I can not find seek works probably with strings !!

   if MsgGet( "Search", "Customer Appreviation", @V_CU_appr,;
              "..\bitmaps\lupa.bmp" )
      select 1
      use cust
      set index to cust10
      if ! DbSeek( alltrim(upper(V_CU_Appr )))
         MsgAlert( "I don't find that customer" )
         GO nRecNo
      else
         oLbx:UpStable()           // Corrects same page stabilizing Bug
         oLbx:Refresh()            // Repaint the ListBox
      endif
   endif


My best guess is that you are searching for a string using an index which is of some different key value.

You may try to insert a line for debugging, for example:
MSGINFO(IndexKey()) right after the line set index to cust10
and see if the primary key of the index is of how you want it to be.
(In my opinion, the primary key must be the Customer Code, and your current index is probably based on the Customer Name).

Please let me know if you solved your problem.

Kind regards
Evans Bartzokas
Posts: 334
Joined: Fri Oct 14, 2005 01:54 PM
seek and string searching
Posted: Sat Apr 22, 2006 08:39 AM
Problem did not solved . I do not know ?
The function you suggessted gave the apropraite key.

      select 1
      use cust
      set index to cust10
      MSGINFO(IndexKey()) 
      if ! DbSeek( alltrim(upper(V_CU_Appr )))
         MsgAlert( "I don't find that customer" )
         GO nRecNo
      else
         oLbx:UpStable()           // Corrects same page stabilizing Bug
         oLbx:Refresh()            // Repaint the ListBox
      endif
   endif

Continue the discussion