I try index dbf where is 30,000 record. FwPpc show error 'hb_errinternal ()'. This is sample:
- Code: Select all Expand view
Function TestIndex ()
Local i := 0
Local aStr := {}
Request DbfCdx
Request DbfFpt
RddSetDefault ('DbfCdx')
Request Hb_Lang_PLWIN
Request Hb_CodePage_PLWIN
Set Century On
Set Epoch To 1995
Set Date German
Set Deleted On
Hb_Lang_Select ('PL')
Hb_SetCodePage ('PLWIN')
FErase ('Test' + IndexExt ())
AAdd (aStr, {'F1', 'C', 40, 0})
AAdd (aStr, {'F2', 'C', 5, 0})
AAdd (aStr, {'F3', 'N', 10, 0})
AAdd (aStr, {'F4', 'C', 20, 0})
AAdd (aStr, {'F5', 'C', 10, 0})
DbCreate ('Test', aStr)
Use Test New
For i := 1 To 30000
Test->(DbAppend ())
Test->F1 := PadL (Test->(RecNo ()), 5)
Test->F2 := PadL (Test->(RecNo ()), 5)
Next
Index On F1 + F2 Tag T1 To Test
Index On F5 + F1 + F2 Tag T2 To Test
Index On F4 + F1 + F2 Tag T2 To Test
Close All
MsgInfo ('Ok')
Return .T.
I use latest FwPpc and Harbour. Is there a method to create structural index for large records dbf ?
Regards
Pawel