21 Ago 2014 15:35
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
23 Ago 2014 11:00
23 Ago 2014 14:33
23 Ago 2014 18:56
...sempre antes de chamar uso: DBGOTOP(), Teste ai.
23 Ago 2014 20:14
24 Ago 2014 11:56
24 Ago 2014 12:51
24 Ago 2014 14:51
Function Main
LOCAL lStatus, cPath, cRdd, lLetodb, cArq, cInd, cTag1, nCont, nFocus
REQUEST LETO
REQUEST DBFCDX
SetMode(25, 80)
lLetodb:= .T. // .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:= "dados01"
cind:= "index01"
cTag1:= "tag01"
nFocus:= 1
lStatus:= .T.
if cRdd = "LETO"
if leto_Connect( cPath ) == -1
lStatus:= .F.
endif
endif
if lStatus
dbCreate( cPath + cArq, { {"CAMPO01","C",10, 0}, ;
{"CAMPO02", "C", 10, 0} } )
dbUseArea( .T., cRdd , cPath + cArq, cArq, .F., .F. )
for nCont:= 1 to 100
dbAppend()
replace CAMPO01 with strzero(nCont, len(CAMPO01)), ;
CAMPO02 with str(nCont, len(CAMPO02))
next
ordCreate( cPath + cInd, cTag1, "CAMPO01",, .F. )
// dbCommit()
ordlistClear()
ordListAdd( cPath + cInd, cTag1)
ordSetFocus(nFocus)
@ 1, 2 say "Rdd..............: " + cRdd
@ 2, 2 say "Banco de Dados...: " + cPath + cArq
@ 3, 2 say "Arquivo de Index.: " + cPath + cInd
@ 4, 2 say "Index............: " + ordName( nFocus ) + "->" + ordKey( nFocus )
browse( 5, 0, MaxRow(), MaxCol())
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
24 Ago 2014 20:24
Minduim escreveu:mas o acesso fora da rede mostrou-se comercialmente inviável, como por exemplo, acessar uma filial pela matriz ou a implantação de um pedido remoto por um representante, além de que o acesso, até que provem o contrário, só é feito pelo ip (xxx.xxx.xx.xx), não contemplando o acesso pelo endereço (www.xxxxx.xx.com);
25 Ago 2014 08:48
25 Ago 2014 09:33
mas o acesso fora da rede mostrou-se comercialmente inviável, como por exemplo, acessar uma filial pela matriz ou a implantação de um pedido remoto por um representante, além de que o acesso, até que provem o contrário, só é feito pelo ip (xxx.xxx.xx.xx), não contemplando o acesso pelo endereço (www.xxxxx.xx.com);
25 Ago 2014 09:40
25 Ago 2014 10:05
sb->(OrdScope(0,strzero(sa->numero,9)+strzero(sa->modelo,2)))
sb->(OrdScope(1,strzero(sa->numero,9)+strzero(sa->modelo,2)))
25 Ago 2014 10:29
25 Ago 2014 10:39
Minduim escreveu:mas também compilei seu demoletodb.prg e não obtive conexão?