I have question about 2 DBFs compare.
Cust.DBF data below
NO NAME
01 ABC
02 Taipei
03 Taiwan
04 NCC
05 CNN
Bill.DBF data below
NO NAME
01 ABC
02 Taipei
So I want to delete Cust.DBF data same as Bill.DBF data(NO)
I want this below
Cust.DBF data below
NO NAME
03 Taiwan
04 NCC
05 CNN
These are my code below:
Cust.DBF->(::cDBx) Index on NO Tag Temp1
Bill.DBF->(::cDB2x) Index on NO Tag Temp2
- Code: Select all Expand view RUN
SELECT (::cDBx)
DO WHILE (::cDBx)->(!EOF())
cCUST_NOx := (::cDBx)->CUST_NO
SELECT (::cDB2x)
SET ORDER TO "Temp2"
(::cDB2x)->( DbGoTop() )
SET SoftSeek OFF
Dr_DbSeek( cCUST_NOx, "Temp2" )
IF !EOF() .AND. !Empty(cCUST_NOx)
IF (::cDB2x)->( DbRLock() )
(::cDB2x)->( DbDelete() )
(::cDB2x)->( DbUnLock() )
ENDIF
ENDIF
SET SoftSeek ON
(::cDBx)->( DbSkip() )
cCUST_NOx := ""
ENDDO
But I can’t delete Cust.DBF(::cDBx) data
Any suggestion for it?
Thanks a lot.