Problem to save with tdatabase - Resolved!
Posted: Fri May 24, 2019 5:17 pm
I have an array aDataBase
and save it in this mode
But it create only record blank why ?
and save it in this mode
Code: Select all
oTariffeBase:= TDatabase():Open( , cDir+"Tariffe", "DBFCDX", .T. )
oTariffeBase:gotop()
For n=1 to Len(aDataBase)
ctipo:="E" //Elemento
ntipotar:="N"
cIdelemento := alltrim(aDataBase[n][2])
celemento := alltrim(aDataBase[n][3])
csettore := alltrim(aDataBase[n][4])
ngiorni := aDataBase[n][5]
ncosto := aDataBase[n][6]
lbloccato := aDataBase[n][7]
cidlistino := alltrim(aDataBase[n][8])
nTotale := aDataBase[n][6]
oTariffeBase:append()
IF oTariffeBase:RLock()
oTariffeBase:tipo := ctipo
oTariffeBase:idElemento := cIdelemento
oTariffeBase:elemento := celemento
oTariffeBase:settore := csettore
oTariffeBase:giorni := ngiorni
oTariffeBase:costo := ncosto
oTariffeBase:tipotar := ntipotar
oTariffeBase:totale := nTotale
oTariffeBase:idlistino := cidlistino
oTariffeBase:bloccato := lbloccato
oTariffeBase:save(.t.)
ENDIF
next