maybe if I had a smaller database the procedures could work better and faster
i tried inTdatabase
oLotto:CopyTo( cDir+"Integrale")
oLotto:CopyTo( cDir+"Virtuale")
but this makes a physical copy of the dbf, instead I wanted to create at least for the "Virtual" archive only the structure and then through a filtering system insert the selected records in the new archive
How could I do ?
- Code: Select all Expand view RUN
If nTipo=2
oDbf :=TDatabase():Open( , cDir+"Virtuale", "DBFCDX", .T. )
oDbf:setorder(1)
oDbf:Exec( <||
SET FILTER TO ( dFirst <= FIELD->DATA .AND. ;
dLast >= FIELD->DATA )
return nil
> )
oDbf:gobottom()
else
oDbf :=TDatabase():Open( , cDir+"Integrale", "DBFCDX", .T. )
oDbf:setorder(1)
oDbf:gobottom()
Endif
If I use
oDbf:Exec( <||
SET FILTER TO ( dFirst <= FIELD->DATA .AND. ;
dLast >= FIELD->DATA )
return nil
> )
then something not run
that's why I thought about creating a new archive by filtering from the full archive