FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Maria DB and incrental seek
Posts: 181
Joined: Thu Apr 17, 2008 02:38 PM
Maria DB and incrental seek
Posted: Thu Jun 08, 2023 09:55 PM
hi all,
I need help because I can't set columns in xbrowse to use incremental seek , only wild seek works on columns whose data is character type in other types I get type mismatch error.
Code (fw): Select all Collapse
  
*--------------------------------------------------------------------------- 
  *- Browse testata
  *--------------------------------------------------------------------------- 
  
   @  ::oWndBtn:nHeight, 1 ;
      XBROWSE ::oBrt ;
           OF ::oWnd ;
         SIZE -1, NIL ;
        LINES ;
        PIXEL ;
         FONT ::oBrtFont ;
     AUTOSORT ;
   DATASOURCE ::oRsTestate ;
     AUTOCOLS;
       UPDATE 
 
   *------------------------------------------------------------------------------
   *- Propietà browse testata oBrt 
   *------------------------------------------------------------------------------
   
   ::oBrt:nDataLines        :=  1
   ::oBrt:nHeaderLines      :=  1
   ::oBrt:nFooterLines      :=  1
   ::oBrt:nDataLines        :=  1
   ::oBrt:lGradientComplete := .T. 
   ::oBrt:lFitGridHeight    := .T.
   ::oBrt:lFooter           := .T.
   ::oBrt:lHScroll          := .T.
   ::oBrt:lIncrFilter       := .F.
   ::oBrt:lSeekWild         := .F. // or .T.
   ::oBrt:lSeekBar          := .T.
   ::oBrt:lGradientComplete := .T. 
   ::oBrt:lFitGridHeight    := .T.
   ::oBrt:lHScroll          := .T.
   ::oBrt:lFlatStyle        := .F.
   ::oBrt:lTabLikeExcel     := .T.
   ::oBrt:nHeadStrAligns    := AL_CENTER 
   ::oBrt:nStretchCol       := STRETCHCOL_WIDEST
   ::oBrt:nColDividerStyle  := LINESTYLE_LIGHTGRAY
   ::oBrt:nRowDividerStyle  := LINESTYLE_LIGHTGRAY
   ::oBrt:nMarqueeStyle     := MARQSTYLE_HIGHLROW

   ::oBrt:bOnChanges := { || ::oRsTestate:ReSync(),;
                             ::oBrt:RefreshCurrent(),;
                             ::oBrt:MakeTotals(),;
                             ::oBrt:RefreshFooters() }

  
  *--------------------------------------------------------------------------
  *- 1 Chiave primaria
  *--------------------------------------------------------------------------
       
   WITH OBJECT ::oBrt:ID
      :lHide := .T.
   END

  *--------------------------------------------------------------------------
  *- 2 Codice conto
  *--------------------------------------------------------------------------
       
   WITH OBJECT ::oBrt:PCO_COD
      :cHeader := "Codice" + CRLF + "conto"
      :nWidth  := 100
      :cEditPicture := "@R !!.!!.!!!!"
      :SetOrder()
   END

  *--------------------------------------------------------------------------
  *- 3 Progressivo Dare
  *--------------------------------------------------------------------------
       
   WITH OBJECT ::oBrt:PCO_DAR
      :cHeader := "Progressivo" + CRLF + "Dare"
      :nWidth  := 120
      :cEditPicture := "@E 999,999,999.99"
   END

  *--------------------------------------------------------------------------
  *- 4 Progressivo Avere
  *--------------------------------------------------------------------------
       
   WITH OBJECT ::oBrt:PCO_AVE
      :cHeader := "Progressivo" + CRLF + "Avere"
      :nWidth  := 120
      :cEditPicture := "@E 999,999,999.99"
   END

::oBrt:CreateFromCode()
TIA
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Maria DB and incrental seek
Posted: Fri Jun 09, 2023 08:35 AM
::bOnChanges := { || ::oRsTestate:ReSync(),;

::RefreshCurrent(),;

::MakeTotals(),;

::RefreshFooters() }

[/quote



Before I go into the main topic, I like to advise you that this code is not required.

XBrowse automatically does all these things.

Repeating will only slow down the browse.

Please just remove this part of the code.



Purpose of oCol:bOnChange is to specify if any other column values need to be changed when this column is changed
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion