Jump to content
Fivewin Brasil

Pesquisa Incremental em base de dados Mysql


marcioe

Recommended Posts

Fiz algo com processamento paralelo e com SqlServer no meu serviço usando o  xbrowse!

Mas no momento só  tenho exemplo do console que serve como base! não muda muito!

ELSEIF nKEY > 64 .AND. nKEY < 123 .OR. nKEY == K_F3
         /*processamento em segundo plano*/
         HB_IdleAdd( {|| HB_BackGroundRun() } )
         nTask := HB_BackGroundAdd( {|| temp->(RefreshTB(oTB)) }, 1000 )
         SET BACKGROUND TASKS ON

         IF nKEY != K_F3
            KEYBOARD Chr(nKEY)
         ENDIF

         cChave := Space(35)
         BOX3DOF(14,16,18,58)
         @ 16,20 GET cChave PICT "@!"
         READ

         cChave := Trim(cChave)
         If !Empty(cChave)
            TEMP->(DBSeek(cChave,.T.))
         Endif

         HB_BackGroundDel( nTask )
         SET BACKGROUND TASKS OFF
         oTB:RefreshAll()
  else....
  
  
  **----------------------------------------------------------------------
static Function RefreshTB(oTB) //aqui vc pode carregar com comando sql e refresh no browse 
**----------------------------------------------------------------------
   Local cTela,oGet:=GetActive()
   Static cLast := ''

   If HB_IsObject(oGet) .and. cLast != oGet:buffer
      cTela := SaveScreen(14,16,18,58)   //não mudar ainda
      DBSEEK(oGet:buffer,.T.)
      oTB:RefreshAll()
      oTB:ForceStable()
      Restscreen(14,16,18,58,cTela)
      cLast := oGet:buffer
      oGet:SetFocus()
   Endif
Return .t.

Espero que ajude, em caso de dúvida fique a vontade, estamos ai!

com isto acredito que vc consegue montar sua lógica

att

JMSILVA 

Link to comment
Share on other sites

xbrwPrincipal := TXBrowse():new( oDlg )
 

WITH OBJECT xBrwPrincipal

    :lSeekWild  := .T. 

    :oSeek := oSay  //Objeto say para que o conteúdo da pesquisa seja exibido
              
     :lIncrFilter := .T. // Liga o Filtro incremental
     :AutoFit()

    :SetRDD( , :lSeekWild )

    :createFromCode()

END

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...