marcioe Posted November 8, 2022 Report Share Posted November 8, 2022 Olá, amigo, bom dia. Teria como postar algum exemplo de pesquisa incremental, porem com base de dados MYSQL. Seria algo como na tela abaixo Sem gerar *Array* Agradeço a Todos Quote Link to comment Share on other sites More sharing options...
Jmsilva Posted November 8, 2022 Report Share Posted November 8, 2022 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 Quote Link to comment Share on other sites More sharing options...
macs Posted November 9, 2022 Report Share Posted November 9, 2022 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 Jmsilva 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.