On Mon, 16 Nov 2009, Agustianes Umbara Suwardi wrote:

Hi,

> Hi, I'm using Harbour 1.1.0-dev nightly build. I'm trying to use my
> FoxPro databases using harbour. Here's a test code:
> function main()
>       REQUEST DBFCDX
>       select 1
>       use /home/anezch/z/data/cor ;
>               index /home/anezch/z/data/corno.idx ;
>               via 'DBFCDX' ;
>               alias cor
>       use
> return nil
> This program always crash with this error message:
> Unrecoverable error 1010: hb_cdxIndexPageRead: Read index page
> failed.          
> Called from ORDLISTADD(0)                                             
> Called from MAIN(7) in test.prg
> When I tried to access it with FoxPro, there were no problem. If I don't
> include .idx in index statement, harbour shows an error telling me that
> it could not find corno.cdx. So I suspected that harbour always assume
> the index is CDX format regardless I write corno.idx.
> Then I tried to create an IDX from harbour:
>       use /home/anezch/z/data/cor via 'DBFCDX' alias cor
>       index on nocor to /home/anezch/z/data/corno.idx
> And when I opened it in FoxPro, I found that corno.idx is actually in
> CDX format. So how can I use IDX in Harbour?

There are four possible index formats based on IDX/CDX structure:

1. uncompresed single tag (.IDX)
2. compresed single tag (.IDX)
3. uncompresed multi tag (.CDX)
4. compresed multi tag (.CDX)

Clipper 5.2 DBFCDX and SIXCDX supports 2 and 4 (maybe also 1 but I haven't
tested it.
Clipper 5.3 DBFCDX, ClipMore/COMIX, [x]Harbour supports only 4.
In documentation ForPro supports 1, 2 and 4.
I haven't heard about implementation which supports 3-rd version.

Probably the file you try to use is in format 2 which is not supported.
In fact it's stripped version of format 3 so if someone is interesting
then he can add support for this format using existing DBFCDX code.

best regards,
Przemek
_______________________________________________
Harbour-users mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour-users

Reply via email to