Maria DB and incrental seek

Maria DB and incrental seek

Postby mauri.menabue » Thu Jun 08, 2023 9: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: Select all  Expand view

 
*---------------------------------------------------------------------------
  *- 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
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: Maria DB and incrental seek

Postby nageswaragunupudi » Fri Jun 09, 2023 8:35 am

[quote]::oBrt:bOnChanges := { || ::oRsTestate:ReSync(),;
::oBrt:RefreshCurrent(),;
::oBrt:MakeTotals(),;
::oBrt: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
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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