Page 1 of 1

Dbf and indexes

Posted: Sat Feb 25, 2006 4:31 pm
by pawelu
Antonio,

I try index dbf where is 30,000 record. FwPpc show error 'hb_errinternal ()'. This is sample:

Code: Select all

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

Posted: Sat Feb 25, 2006 5:45 pm
by Antonio Linares
Pawel,

We have modified the internal error msg to see the problem description and here it is:

Image
It looks as a temporary file can't be created. We are going to contact Przemek to get his advise.

Posted: Sat Feb 25, 2006 6:58 pm
by Antonio Linares
Pawel,

Fixed :)

Please download Harbour from FWPPC site again.

Posted: Sat Feb 25, 2006 7:31 pm
by pawelu
Antonio,

thanks so much !

Regards
Pawel