It's look like Harbour for Pocket PC don't remove data from FPT memo file when PACK command is use. Below is sample code.
Regards
Pawel
- Code: Select all Expand view RUN
#Include 'FwCe.Ch'
Function TestTr ()
Local aStr := {}
Local i := 0
Local j := 0
Local k := 0
AppIni ()
AAdd (aStr, {'F1', 'N', 5, 0})
AAdd (aStr, {'F2', 'M', 10, 0})
DbCreate (CurDir () + '\TESTTR', aStr)
Use (CurDir () + '\TESTTR') New CodePage 'PLWIN'
For i := 1 To 200
TestTr->(DbAppend ())
TestTr->F1 := i
TestTr->F2 := PadL (i, 10, '0')
Next
TestTr->(DbGoTop ())
Do While !TestTr->(Eof ())
TestTr->(DbDelete ())
TestTr->(DbSkip ())
Enddo
Select TestTr
Copy To (CurDir () + '\TESTTRC') All // <-- this works ok
Select TestTr
Pack // <--- this don't remove data from memo file for deleted records
TestTr->(DbCloseArea ())
i := FOpen (CurDir () + '\TESTTR.FPT')
j := FSeek (i, 0, 2)
FClose (i)
i := FOpen (CurDir () + '\TESTTRC.FPT')
k := FSeek (i, 0, 2)
FClose (i)
MsgInfo (Str (j) + IIf (j == k, ' == ', ' != ') + Str (k))
Return .T.
Function AppIni ()
Request DbfCdx
Request DbfFpt
RddSetDefault ('DbfCdx')
Request Hb_Lang_PL852
Request Hb_Lang_PLWIN
Request Hb_CodePage_PL852
Request Hb_CodePage_PLWIN
Set Century On
Set Epoch To 2000
Set Date German
Set Deleted On
Hb_LangSelect ('PL')
Hb_SetCodePage ('PLWIN')
Return .T.