Wanderson,
Note that all the field data is stored in a buffer array in database objects. Also, of course, both files must have exactly the same structure. Below is an example of how to copy all the field data.
It depends on the situation, but you may want to only do one commit after the ENDDO instead of one after each record save. This would be much faster, but maybe not as safe in a multi-user environment. However, if you are only copying a few records this would only take a few seconds so there isn't much risk.
James
oArqCli:GoTop()
Do While ! oArqCli:Eof()
oArqCli:Load()
oCliCli:Blank()
//oCliCli:(All fields) := oArqCli:(All fields) <------------------- how?
copyAll(oArqCli, oCliCli)
oCliCli:Append()
oCliCli:Save()
oCliCli:Commit()
oArqCli:Skip(+1)
loop
Enddo
function copyAll( oDB1, oDB2 )
Local i:=1
for i 1 to len(oDB1:aBuffer)
oDB2:aBuffer[i]:= oDB1:aBuffer[i]
next
return nil