reading FoxPro .dbf file metadata?

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
dsimpson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 15
Joined: Thu Dec 18, 2008 10:10 pm
Contact:

reading FoxPro .dbf file metadata?

Post by dsimpson » Wed Jul 14, 2010 5:49 am

I know that previously Bob Sneidar had posted info about reading metadata from .dbf files.

I am wondering if this code was uploaded or made available somewhere, as I have a need to perform the same task. If I can read enough metadata from .dbf files, then I can attempt to perform the conversion of an entire FoxPro database into a Revolution stack utilizing a SQL database backend.

I don't need to use Rev to read the actual data from the .dbf files, I have other software to perform that task. I just need to be able to read the low-level metadata for field name, field type, NULL status, UNIQUE status, and primary key status of fields.

David Simpson
http://www.fmpromigrator.com
David Simpson
www.fmpromigrator.com

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Re: reading FoxPro .dbf file metadata?

Post by Janschenkel » Wed Jul 14, 2010 6:17 am

Hi David,

Here's a pretty good explanation of the .dbf file structure, including the 'header' that contains the metadata:
http://www.clicketyclick.dk/databases/x ... t/dbf.html
One .dbf file contains a single table of the database (except for the 'memo' long text fields, which are stored in a separate .fpt file)

HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm
Location: Oklahoma, USA

Re: reading FoxPro .dbf file metadata?

Post by doc » Wed Jul 14, 2010 11:44 am

You will also find a couple of very well detailed files at the Wotsit site: http://www.wotsit.org/

=Doc-

dsimpson
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 15
Joined: Thu Dec 18, 2008 10:10 pm
Contact:

Re: reading FoxPro .dbf file metadata?

Post by dsimpson » Wed Jul 14, 2010 4:41 pm

Thanks Jan and Doc. I have looked at some of this info previously and was trying to avoid reinventing the wheel. But upon looking at it again, it might not be that time consuming to just write it all from scratch. Besides, I am going to need the backlink list from .DBC files anyhow, and don't see much of any other way to get that info.
David Simpson
www.fmpromigrator.com

Post Reply

Return to “Databases”