letodb->browse()
Enviado: 21 Ago 2014 15:35
amigos, a função BROWSE() esta com um comportamento estranho utilizando o LETODB;
ao alterar o conteúdo dos registros, a visualização do arquivo não esta atualizando corretamente;
harbour 3.4 + mingw + letodb
alguns dos amigos que utiliza esta ferramenta poderia verificar esta ocorrencia;
teste.prg
Tags: LetoDB
ao alterar o conteúdo dos registros, a visualização do arquivo não esta atualizando corretamente;
harbour 3.4 + mingw + letodb
alguns dos amigos que utiliza esta ferramenta poderia verificar esta ocorrencia;
teste.prg
Function Main
LOCAL lStatus, cPath, cRdd, lLetodb, cArq, cInd, cTag1, nCont
REQUEST LETO
REQUEST DBFCDX
SetMode(25, 80)
lLetodb:= .F. // .T. teste com o LETO
// .F. teste sem o LETO
if lLetodb
cRdd:= "LETO"
cPath := "//LOCALHOST:2812/"
else
cRdd:= "DBFCDX"
cPath:= diskname() + ":\" + curdir() + "\"
endif
RDDSETDEFAULT( cRdd )
cArq:= "teste1"
cind:= "teste2"
cTag1:= "teste3"
lStatus:= .T.
if cRdd = "LETO"
if leto_Connect( cPath ) == -1
lStatus:= .F.
endif
endif
if lStatus
dbCreate( cPath + cArq, { {"NOME","C",10, 0}, {"ORDEM", "C", 10, 0} } )
dbUseArea( .T., cRdd , cPath + cArq, cArq, .F., .F. )
for nCont:= 1 to 10
dbAppend()
replace NOME with strzero(nCont, len(NOME)), ;
ORDEM with str(nCont, len(NOME))
next
ordCreate( cPath + cInd, cTag1, "NOME",, .F. )
ordlistClear()
ordListAdd( cPath + cInd, cTag1)
browse()
dbCloseAll()
if cRdd = "LETO"
Leto_FErase( AtRepl( "\", cPath + cArq + ".dbf", "/" ) )
Leto_FErase( AtRepl( "\", cPath + cInd + ".cdx", "/" ) )
else
Ferase( cPath + cArq + ".dbf" )
Ferase( cPath + cInd + ".cdx" )
endif
endif
return Nil
Tags: LetoDB