To delete a record on Array I use this
function del_row( oBrowse )
if ! Empty( oBrowse:aArrayData )
ADel( oBrowse:aArrayData, oBrowse:nArrayAt, .t. )
oBrowse:Refresh()
endif
xbrowser oBrowse:aDeleted <------
return nil
it delete the row but then when I need oBrowse:aDeleted I have the empty array
How it possible ?
Problem with oBrowse:aDeleted
- Silvio.Falconi
- Posts: 7184
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Problem with oBrowse:aDeleted
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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
- nageswaragunupudi
- Posts: 10733
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Problem with oBrowse:aDeleted
Use
to delete rows. Please do not use your own functions to delete.
Code: Select all | Expand
oBrw:Delete()
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7184
- Joined: Thu Oct 18, 2012 7:17 pm
- Been thanked: 9 times
Re: Problem with oBrowse:aDeleted
Yes it delete the record but then re-save on archivenageswaragunupudi wrote:Useto delete rows. Please do not use your own functions to delete.Code: Select all | Expand
oBrw:Delete()
There's probably something I don't understand
I 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
oRecord := oDbf:record()
Code: Select all | Expand
aDataForm := oDbfMod:DbfToArray( cItemFlds, { ||FIELD->codRep == cCode_Tmp } )
When I go to save I made
Code: Select all | Expand
// 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()
Code: Select all | Expand
oDbfMod:ArrayToDBF( aDataForm , cItemFlds,, .t., .t. )
not delete the record on oDbfMod
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 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
I use : FiveWin for Harbour March-April 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