Page 1 of 1

GPF Error with MEMOLINE and DBFCDX

Posted: Sun Jan 08, 2006 3:11 am
by cdmmaui
Hello,

I am getting a GPF (Harbour Exception) with MEMOLINE and DBFCDX. Can anyone help?

Thank You,

Posted: Sun Jan 08, 2006 5:05 am
by R.F.
If you are working with DBF/CDX/FPT files created with Clipper, Comix or Six Driver, let me tell you that those FPT files are not compatible with xHarbour FPT structure, this is due because Clipper and friends create FPT files with a "memblock" size of 16 bytes which is not compatible with (x)Harbour FPT memoblock, which is 64 bytes long, so any operation performed over the memofile will fail.

Since (x)Harbour uses a real FoxPro file format, you will need to make your dbf files compatible with (x)Harbour, this is an easy job, do the following:

Using (x)Harbour, create a new empty structure similar to the ones created with Clipper, this will create a new empty DBF and FPT, but the FTP will be fully compatible with (x)harbour.

Then using Clipper, open the empty structure created with (x)Harbour, Clipper will not have any problem opening the new structure:

USE xHarbourCreatedFile.dbf
APPEND FROM ClipperCreatedFile.dbf

And you are done, you will have a fully (x)Harbour compatible DBF/CDX/FTP file.

Thank You

Posted: Sun Jan 08, 2006 6:09 am
by cdmmaui
Thank you for your help!

Posted: Mon Jan 09, 2006 3:23 pm
by Randal
[quote="RF"]If you are working with DBF/CDX/FPT files created with Clipper, Comix or Six Driver, let me tell you that those FPT files are not compatible with xHarbour FPT structure, this is due because Clipper and friends create FPT files with a "memblock" size of 16 bytes which is not compatible with (x)Harbour FPT memoblock, which is 64 bytes long, so any operation performed over the memofile will fail.

According to the docs the default memoblock size for Comix is 64 bytes.

Regards,
Randal Ferguson