nageswaragunupudi wrote:Use
- Code: Select all Expand view RUN
oBrw:Delete()
to delete rows. Please do not use your own functions to delete.
Yes it delete the record but then re-save on archive
There's probably something I don't understandI have two dbf
Report.dbf (oDbf)
Formati.dbf ( oDbfMod) have 30 fields +1 for recno()
at first for editing I take a record on Report.dbf
- Code: Select all Expand view RUN
oRecord := oDbf:record()
create am array from another archive
- Code: Select all Expand view RUN
aDataForm := oDbfMod:DbfToArray( cItemFlds, { ||FIELD->codRep == cCode_Tmp } )
and work aDataform on Xbrowse
When I go to save I made
- Code: Select all Expand view RUN
// save oDbf Report.dbf
// delete rows
if ! Empty( oBrowse:aDeleted )
AEval( oBrowse:aDeleted, { |a| a[ 31 ] := -a[ 31 ] } )
oDbfMod:SaveArrayToDBF( cItemFlds, oBrowse:aDeleted )
endif
AEval( aDataForm, { |a| a[ 1 ] := oRec:codRep } )
AEval( aDataForm, { |a,i| a[ 29 ] := strzero(i,5) } )
oDbfMod:SaveArrayToDBF( cItemFlds, aDataForm )
//Salva Report.dbf ok
oRec:Save()
I tried also with
- Code: Select all Expand view RUN
oDbfMod:ArrayToDBF( aDataForm , cItemFlds,, .t., .t. )
append a record empty on oDbf
not delete the record on oDbfMod
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com