seek and string searching

seek and string searching

Postby Ehab Samir Aziz » Fri Apr 14, 2006 10:58 pm

I can not find seek works probably with strings !!

Code: Select all  Expand view  RUN
   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

Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm

Re: seek and string searching

Postby E. Bartzokas » Thu Apr 20, 2006 6:39 pm

Ehab Samir Aziz wrote:I can not find seek works probably with strings !!

Code: Select all  Expand view  RUN
   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
User avatar
E. Bartzokas
 
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Postby Ehab Samir Aziz » Sat Apr 22, 2006 8:39 am

Problem did not solved . I do not know ?
The function you suggessted gave the apropraite key.

Code: Select all  Expand view  RUN
      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
Ehab Samir Aziz
 
Posts: 334
Joined: Fri Oct 14, 2005 1:54 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 73 guests