Jump to content
Fivewin Brasil

xbrowse


Alain da Silva

Recommended Posts

bom dia, estou tentando fazer uma pesquisa em meu browse com uma pesquisa com parte de uma string usando o comando OrdWildSeek.

dbf com cdx.

Estou fazendo o seguinte:

@40,260 get oGet1 var cNom PICT "@!"  OF oDlg Size 230,12 pixel BITMAP ".\IMAGE\bitmaps\zoom.bmp"  action PesquisaParteString(obrw,cnom) 

  SELE 47
  DBSETORDER(1)
  TABELA3->(dbgotop())
  OTABELA3:={}
  DbEval({|| AaDd(OTABELA3,{TABELA3->CODIGO,TABELA3->TABELA3,alltrim(tabela3->DESCRICAON)})})
  TABELA3->(dbgotop())
  @60,5 XBROWSE oBrw SIZE 490,180;
            COLUMNS 1,2,3;
            HEADERS "Código","Tabela3","Descrição" ;
            PICTURES NIL,Nil,NIL;
            COLSIZES 80,300,300 ;
            OF oDlg pixel;
            ARRAY oTabela3

FUNCTION PesquisaParteString(obrw,oTexto)
    SELE 47
    DBGOTOP()
    if OrdWildSeek("*"+alltrim(OTEXTO)+"*")
       oTAbela3:={}
       AaDd(OTABELA3,{TABELA3->CODIGO,TABELA3->TABELA3,alltrim(tabela3->DESCRICAON)})
       DO WHILE OrdWildSeek("*"+alltrim(OTEXTO)+"*",.T.)
          AaDd(OTABELA3,{TABELA3->CODIGO,TABELA3->TABELA3,alltrim(tabela3->DESCRICAON)})
       ENDDO
    else
       tabela3->(dbgotop())
    end
    amensagem:=""
    OBRW:SETARRAY(OTABELA3)
    OBRW:REFRESH()
    DBGOTOP()
RETURN nil

-------------------------------------------

Funciona, o browse é atualizado somente com os dados da minha pesquisa. Agora como faço pra através do browse alterar meu lançamento no arquivo. Como faço essa relação array com o banco de dados.

 

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...