How to fish out data from .fpt / .cdx files (Foxpro?)

A

Ang

QUESTION:
How do I access (no pun intended) data in files with an extension of either
".fpt" or ".cdx" ?

BACKGROUND:
I don't know beans about databases. I always meant to fiddle with Access and
learn more about database stuff. But I never did. So then, the company I
work for bought some other company and inherited some files that appear to
have been created using some iteration of Foxpro(???). I've been poking
through these files to see if there's anything in there that we can use. One
area of these files that I've been homing in on consists of about 25 files
with extensions such as .dbf .frt .frx .cdx .fpt, etc. Of those files,
there's a 15Meg "dbf" file, a 1.5Meg "cdx" file, and a 3Meg "fpt" file that
appear to contain data I could potentially use. The other files are mostly
less than 100K in size so I've set those aside for the time.

This weekend I updated my Office to 2003 and spent some time reading a Que
book about Access. (....errrrrr, the 97 version; surely database stuff
hasn't changed that much?) Then I started puttering around with these files.
After receiving the message "External table not in expected format," I
cheerfully abandoned Access and opened the "dbf" file in Excel.
I couldn't figure out how to do much with the ".cdx" file. There appears to
be some stuff (text fields) in there that I'd like to get at, but since I
was bombing, I turned to the ".fpt" file. I wasn't able to do much with that
either, but of course I clicked away madly and opened the file in Word.
There is data (text descriptions) in that file which I would like to rescue.
Can anyone either explain what I'm fiddling with or point me towards some
web links where I can educate myself?

Thanks,
Ang
 
A

Ang

uhhh, sorry to bother you all. I've figured it out, or at least the nuts and
bolts of it. ...guess I was tired last night.

By the way, in case anyone else is trying to fiddle with Foxpro files, you
have to load the Foxpro driver via ODBC data sources.
 
C

Cindy Winegarden

Hi Ang,

As you've discovered, FoxPro and Visual FoxPro files come in 3 parts. The
DBF is the table itself, The CDX (if present) is the index file, and the FPT
is the contents of memo fields in the main table, if there are any. You
would not access the CDX and FTP files directly; the FoxPro data engine
reads them if it needs to.

You may also see a DBC which is a Database Container that holds metadata
about Visual FoxPro tables. (It's index and memo files are DBX and DCT.) If
the DBC file is present then you would want to set up the ODBC data source
to access a database rather than a free table directory.

There is also an OLE DB data provider for FoxPro and Visual FoxPro.
 
A

Ang

hmmm......
Thanks, Cindy... I understand the first paragraph.

But you're starting to lose me on your second paragraph. I understand the
concept of a table (dbf), an index (cdx), and a memo field (ftp). Can you
please explain a little further about database containers? {And of course,
like all curious people I sure would like to know why the "table - index -
memo" business was not good enough and had to be augmented with dbc's,
dbx's, and dct's??}

Thank you.
Ang
 
C

Cindy Winegarden

Hi Ang,

The DBC allows for meta data (data about data) such as:

Field comments and captions
Persistent relationships
Field and record-level validation without writing code
Rules for referential integrity with cascading updates and deletes
Stored procedures
Views based on local and/or remote tables
Connections to remote data sources
Primary and Candidate keys
Long table and field names
Default values
Input masks
Triggers

You will find many of these same features in other databases such as
Microsoft SQL Server.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top