Solved

.DAT file conversion.

Posted on 2006-11-01
8
9,869 Views
Last Modified: 2013-12-25
Hi there.

I have a client that has an old DOS Btrieve database with several .dat files named customer.dat, etc. I am looking for some kind of utility to convert these .dat files into something usable, such as a csv file. Any suggestions would be welcomed. Thank you in advance.

ComputerGuy : -)
0
Comment
Question by:Computerguy107
8 Comments
 
LVL 11

Expert Comment

by:ch2
ID: 17857851
You can use BUTIL.exe

Download here:

http://www.goldstarsoftware.com/download.asp
0
 
LVL 11

Expert Comment

by:ch2
ID: 17857897
Also you will need Btrieve.exe

you can create a batch file like this one:

@echo off
btrieve
butil -recover yourfile.dat newfile.csv
0
 
LVL 5

Author Comment

by:Computerguy107
ID: 17859286
I tried that and all I came up with was a bunch of **&&^^%%$$$$$  all garbage.
0
 
LVL 11

Expert Comment

by:ch2
ID: 17859784
I have also some old btrieve files wich also outputs garbage, because they were created with Btrieve 4.11b using BFLOAT data type and stored in Microsoft Binary Format.

btw which btrieve version are those files?

@echo off
btrieve
butil -ver yourfile.dat
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 5

Author Comment

by:Computerguy107
ID: 17871338
The version is Btreive is 5.1
0
 
LVL 1

Expert Comment

by:wayne_freeman
ID: 17903665
Hi Computerguy,

Unfortunately, butil won't actually create a file in csv format.  The format it does create is a Btrieve "unformatted", or sequential file, but it is neither clear ascii text (as you've found out) nor legible as a csv.

There are third-party tools that will do this, and Bill might have one on his site, but here's one I've found in the Pervasive Component Zone:

http://www.pervasive.com/ComponentZone/Component/Lookup.asp?Function=ShowDetail&ID=297&Component=butool+%28btr+export%29&AuthorID=1202&CategoryID=6&Page=2&CategoryName=Tools+%2F+Utilities

Give it a try and let us know how it works out.  There might be an even better one out there somewhere.

Wayne Freeman
Analytica Business Systems
www.analyticabiz.com
0
 
LVL 28

Accepted Solution

by:
Bill Bach earned 250 total points
ID: 17916783
You can also get more information about what it takes to extract data from a Btrieve database from our white paper on ODBC Access of Btrieve files, located at www.goldstarsoftware.com/press.asp.  

As you'll see by the paper, it sometimes gets quite complicated, we also offer services to perform the extraction for various companies.  Given the data set, and sometimes a sample application, we can provide a turnkey extraction for you if you are interested in outsourcing the process.
0
 
LVL 11

Assisted Solution

by:ch2
ch2 earned 250 total points
ID: 17921291
Well, it won't exctract a csv file but will output each record on the database.

Then you need to know the key.

For example:

In the output file you will see the "record length" at the begining of each line, a number and a comma. Ex; 130, This means 130 bytes.

From here you will have to guess what is each byte if it's a String, Date, Bfloat etc..

If the data was stored as string you should see plain text on your recovered file if not you will see only strange characters, as you do.

If you have they key, you can download pervasive 6 (i say 6 because it was the one i used to do this) and open those btrieve files and put the key manally.

If you don't have they key or don't have any idea of programming, i'd suggest BillBach advise.
0

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.

Join & Write a Comment

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

13 Experts available now in Live!

Get 1:1 Help Now