how to read BTrieve 6.x data

I need a way to read and extract data form .dat BTreive file.
Who is Participating?
Bill BachConnect With a Mentor PresidentCommented:
The white paper I mentioned above describes it.  Simply, the command is this:
    BUTIL -RECOVER <datafilename> <unffilename>

When done, you'll have a UNF file that you can parse by writing your own application.  Without valid DDF's, it'll be up to you to parse the data properly, figuring out what each byte in the record structure means.  This is no easy task, but it IS possible with some perseverance and (sometimes) good guesswork.
Btrieve 6 uses ISAM files and does not have a data dictionary.
If you are lucky you may also have  some .ddf files which provide
the data dictionary for easier access.

To read this file without .ddf files you need  the description of the
file structure (field types, length, name) to access the data.
Then you can write a program and export the data or create some
.ddf files if you have access to the needed tools (see post above).

If you have working .ddf files and you can access your data with
either with Xtrieve (old), Pervasive.SQL  (current BTrieve version)
or 3rd party tools.

The best solution probably is to export via the corresponding application
(if possible) or to write a small export program if you gave access to
the file description or .ddf files.
Improve Your Query Performance Tuning

In this FREE six-day email course, you'll learn from Janis Griffin, Database Performance Evangelist. She'll teach 12 steps that you can use to optimize your queries as much as possible and see measurable results in your work. Get started today!

Bill BachPresidentCommented:
Here's another white paper to get you started:

It also includes a way to export the data from Btrieve format to UNF format -- which may take one more step out of the data transfer process.
novologikAuthor Commented:
Hi guys,

BCipollone: Thanks for the answer ...but those tools dosent work because I don't have BTrieve install on my machine.

DonConsolio: Yes I have all the ddf files and I'm able to read them with a third party software....I can read the data to but the third party sotware I used dosen't work very good when I read and export the data.... I tried with Pervasive 11 (the lastes version) I can read the dbf but not the data...maybe there's a to big difference with the data version.

BillBach: I take a look to the pdf and I will try the Pervasive version 9. I'll give you new later....

Thanks guys.....
Bill BachPresidentCommented:
The DDF's can be likened to a "transparency" overlay that defines the underlying Btrieve files.  If your DDF definitions don't match the Btrieve definitions, then you'll have all sorts of problems.  Check around and see if you can find a new set of DDF's (from the developer, if needed).  Note that PSQLv11 is current, and PSQLv9 won't give you any different results.  If the DDF's are bad, then you need new ones -- no question about it.

PSQLv11 also has a component called the "DDF Builder", and this can be used to either modify your existing DDF's or create new ones.  Having access to original source code is VERY helpful in this regard.

novologikAuthor Commented:
Yes...I understand....The developper is one of my competitor...I just sell my software to one of his customer....I need to access the data to transfer in my SQL Server database....I would like to be able to do that without contact them....!!!! I test with version 9 and it's not working....But I found a version of BTrieve (Pervasive SQL 2000) and I read that this version will be able to read the BTrieve data without any problem.

If I have the right version with DDF file, did I will be able to read them? If the DDF file are not perfert at 100% it will work are not?

Bill BachPresidentCommented:
All versions of Pervasive PSQL *are* Btrieve.  Btrieve 6.15 was replaced by Pervasive.SQL 7, which was replaced by Pervasive.SQL 2000i.  Then came Pervasive.SQL V8, then Pervasive PSQL v9, Pervasive PSQL Summit v10, and now Pervasive PSQL v11.  They will all work the same way.  All can read the data, and all will require DDF's to read it directly from SQL.  

If the DDF's are CLOSE then you may be able to get most opf what you want.  If they are not close, then you'll be out of luck.  

As a developer, you have other options.  Instead of writing your own Btrieve application, though, use the BUTIL command to export the data to a UNF file, and then write your own application to parse the UNF file as described in the white paper.  Yes, this is a lot of work, but in the absence of DDF's, it is your only option.
novologikAuthor Commented:
Hi BillBach,

Do you have more information about the BUTIL command? I think I will need to go through that big process because the DDF files are not perfect and somme infomation cannot be transfer correctly.

P.S.: I use BTSearch 2009 ... it work fine ....only if your DDF files are perfect.
novologikAuthor Commented:
I finaly find a guy in california who recreate the ddf files for me and after that everything work fine. That guy is the one who create BTSearch 2009 software!!!!!

Thanks every one!!!!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.