GPF Error with MEMOLINE and DBFCDX

Post Reply
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

GPF Error with MEMOLINE and DBFCDX

Post by cdmmaui »

Hello,

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

Thank You,
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post 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.
Saludos
R.F.
User avatar
cdmmaui
Posts: 653
Joined: Fri Oct 28, 2005 9:53 am
Location: The Woodlands - Dallas - Scottsdale - London
Contact:

Thank You

Post by cdmmaui »

Thank you for your help!
Randal
Posts: 250
Joined: Mon Oct 24, 2005 8:04 pm

Post 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
Post Reply