I must erase all record of an invoice number ( the filed is 13cr)
Local nInvoice := "1234567890128"
the oPartres dbf is index on INDEX ON RESITEMS->INVNUM + STR( SERIAL, 3, 0 ) TAG invnum TO resitems
oPartres:=TDatabase():Open( , cDir+"ResItems", "DBFCDX", .T. )
oPartres:setorder(1)
oPartres:gotop()
oPartRes:Gotop()
Do While .not. oPartRes:eof()
IF alltrim(oPartRes:InvNum) == alltrim(nInvoice)
// Msginfo( oPartRes:InvNum ,nInvoice)
oPartRes:delete()
Endif
oPartRes:skip()
EndDo
oPartRes:Gotop()
SET DELETED ON
oPartRes:SetOrder( 0 )
oPartRes:GoTo( 1 )
oPartRes:ArrayToDBF( aItems, cItemFlds, nil, .t., .t. )
it save goog but erased all records
I wish save on dbf with the condition alltrim(oPartRes:InvNum) == alltrim(nInvoice
Any solution please ...
Local nInvoice := "1234567890128"
the oPartres dbf is index on INDEX ON RESITEMS->INVNUM + STR( SERIAL, 3, 0 ) TAG invnum TO resitems
oPartres:=TDatabase():Open( , cDir+"ResItems", "DBFCDX", .T. )
oPartres:setorder(1)
oPartres:gotop()
oPartRes:Gotop()
Do While .not. oPartRes:eof()
IF alltrim(oPartRes:InvNum) == alltrim(nInvoice)
// Msginfo( oPartRes:InvNum ,nInvoice)
oPartRes:delete()
Endif
oPartRes:skip()
EndDo
oPartRes:Gotop()
SET DELETED ON
oPartRes:SetOrder( 0 )
oPartRes:GoTo( 1 )
oPartRes:ArrayToDBF( aItems, cItemFlds, nil, .t., .t. )
it save goog but erased all records
I wish save on dbf with the condition alltrim(oPartRes:InvNum) == alltrim(nInvoice
Any solution please ...
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


