BTRIEVE record Manager Version 4.11b (Need to convert BTR files)

Posted on 2009-02-16
Last Modified: 2013-12-25
I work for a company that has given me a big under taking and I need some help in getting started.  I have about 50 Manufacturing locations.  The program that run the plants was written in QuickBasic (I do not have the source code).  The program uses BTRIEVE record Manager version 4.11b or a sub function of it the read/write data to the BTR files.  The program runs on either a OLD 286 ISA card rack system or a TOWER PC that could have either windows XP or straight DOS.  

I am needing to pull information out of the BTR files and dump the data into a SQL Server Database.  Later down the road I may need to write back to the BTR files.  I do not have any of the DES files.  About the best I can do is use BUTIL -STAT to get the information on the file and of course when I try the -Recover option I get a unreadable txt file.  Can someone please help get me pointed in the right direction?
Question by:B0o_1999
    LVL 41

    Expert Comment

    Could this link be of any help? They are recommending a program to export the BTR format to ASCII or dbase. After that you can use SSIS or DTS (depending on SQL Version 2005 or 2000) or BULK insert to upload to SQL Server
    I believe though, that the only way to access Btrieve files through ODBC or Access or any third party tool is to have DDFs.

    Author Comment

    I have tried BTsearch and Pervassive v10 I think.  With BTsearch I am able to make out the String fields with no problem (Creating a DDF).  The problem I have comes in when I try to define the SINGLE and INTEGER fields.  I say this because I have been able to get my hands on some source code.  Now I don't know Quick Basic, but I was able to figure out where the programmer set field types in the program, I am banking on the types being the same in the BTR files.  This being said I copied the program and BTR files, Deleted all the data out of one of the BTR's and entered one row of data.  Being that I know what the values should be I can't find a match in BTsearch except for the String fields.  For example if I was looking for a Integer value of 45 (not 45.00).  In BTsearch all I can find that was close was 54.  Am I missing something here?
    LVL 28

    Accepted Solution

    An INTEGER is a 4-byte integer, which is represented as a binary value as well in little-endian format (least significant byte first).  An integer with a numeric value of 45 would not be visible if looking with a text editor.  However, once you have a hex editor available (like hex Workshop), then you'll see somewhere the hex string of 0x2D 0x00 0x00 0x00, which in little-endian format is the hex value 0x0000002D, which converts to 45 decimal.

    A SINGLE is a 4-byte Float, which in QuickBASIC is also known as a BFloat.  It is represented in a binary format defined originally by Microsoft.  For information on the format itself, refer to the Pervasive manuals by searching for "Btrieve Data Types" and looking for the BFLOAT data type.

    To export the data via SQL calls, you need to create Data Dictionary Files (DDF's), which makes it all very easy.  For info on WHY this is the way it is, go to and grab the white paper on accessing Btrieve files from ODBC.  As the paper explains, if you have source code for a table, it should be quite simple to build a DDF for that table.  With a bit of experience, it can even be downright quick -- and you'll be able to export the data directly to comma-delimited text from PSQLv10.


    Author Comment

    Thanks alot peps. This doesn't completly fix the problem, but it gets me on the right track.   Thanks for the addy BillBach.  BTW, I did find a old BTRIEVE v4.11b manual.  Seems as though my life would be a hole lot easier if I could find the old BTRIEVE v4.11b Suite or however the labeled it back then.

    If anyone comes across where I could get my hands on it, let me know.  I am going to consider this question Closed.  

    Author Closing Comment

    Thanks for the ADDY!!
    LVL 28

    Expert Comment

    by:Bill Bach
    You cannot find it anywhere.  Btrieve 4.x was a product of SoftCraft, which then became Novell, which was then spun out to Btrieve Technologies, which changed their name to Pervasive Software.  So, in essence, when you are testing PSQLv10, you have the same Btrieve engine in there (with lots of new features and better performance and support).

    PSQLv10 has the needed tools to help create the DDF's (see the DDF Builder for one option, or write your own CREATE statements as we always recommend), and since it provides the SQL engine and ODBC drivers directly, you can use DTS/SSIS to extract the data directly into SQL Server.  I have personally done several if these projects for various companies, and the process is pretty straightforward once you have the DDF's correct.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Creating and Managing Databases with phpMyAdmin in cPanel.
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now