Opening .dta and .key files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Opening .dta and .key files

Floris Bos
Hi,

I've got a big problem. I've got an old program that's written in Turbo
Pascal, I don't know which version. I've only got the compiled executable
(.exe file), I haven't got the source code. The program works with a
database that consists of .dta and .key files which represent the data
tables.

The program has been used for years and the database contains lots of data
that has been build up through these years. The problem is that I want to
stop using this program but need to extract the data somehow. My goal is to
convert this Turbo Pascal database to MS Excel or MS Access so that the data
can be used by these MS Office applications.

Is there a way to accomplish this and if so, how? Any help would be very
much appreciated because this is a HUGE problem for me.

Thanks in advance!


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

RE: Opening .dta and .key files

Cox, Stuart TRAN:EX
I'd guess that these two file types are data and index files produced by the
programmer of your TP program when he used the "Turbo Pascal Database
Toolbox" as the database manager.  Borland gave some hints that they might
release the source code for these toolboxes a few years ago but I've yet to
see it actually happen.  Until such time as that occurs, it's not available
above board.

If I remember correctly (both the manuals for the TP3 CP/M and DOS and TP4
DOS are at home), there's a "block" of header information of the same size
as the block of data that comprises each record of the database, in the
datafile.  Try to detect a pattern of repeats of similar looking stuff in
the file to ascertain the length of the blocks.  Then, you can try to detect
how long the individual fields are within the block.  The database toolboxes
wrote straight up TP binary data into their files.  That's to say that an
integer was stored as (what?) little endian two byte signed integers and
longints kinda the same, strings as length chr with the balance of the full
length of the type of the string following.  You get the idea.

The index files were likely recreated upon each run of the program on the
fly.  It was pretty much the programmer's responsibility to maintain them
(unlike dBase).  

So, I'd further guess that you've got a couple of lunch breaks of data
spelunking ahead of you.

Stu

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Floris Bos
Sent: Thursday, September 15, 2005 11:11 AM
To: [hidden email]
Subject: [fpc-pascal] Opening .dta and .key files


Hi,

I've got a big problem. I've got an old program that's written in Turbo
Pascal, I don't know which version. I've only got the compiled executable
(.exe file), I haven't got the source code. The program works with a
database that consists of .dta and .key files which represent the data
tables.

The program has been used for years and the database contains lots of data
that has been build up through these years. The problem is that I want to
stop using this program but need to extract the data somehow. My goal is to
convert this Turbo Pascal database to MS Excel or MS Access so that the data

can be used by these MS Office applications.

Is there a way to accomplish this and if so, how? Any help would be very
much appreciated because this is a HUGE problem for me.

Thanks in advance!


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Opening .dta and .key files

Luiz Americo Pereira Camara-2
In reply to this post by Floris Bos
Floris Bos wrote:

> Hi,
>
> I've got a big problem. I've got an old program that's written in Turbo
> Pascal, I don't know which version. I've only got the compiled
> executable (.exe file), I haven't got the source code. The program works
> with a database that consists of .dta and .key files which represent the
> data tables.
>
> The program has been used for years and the database contains lots of
> data that has been build up through these years. The problem is that I
> want to stop using this program but need to extract the data somehow. My
> goal is to convert this Turbo Pascal database to MS Excel or MS Access
> so that the data can be used by these MS Office applications.
>
> Is there a way to accomplish this and if so, how? Any help would be very
> much appreciated because this is a HUGE problem for me.
>

It looks that these datafiles use proprietary format which will not be
understood unless you have the source code (it's not the case) or you
use reverse engineering techniques (really hard to accomplish).

The only way i see is to export the data to a text file using a possible
report function of the program (if it exists) and then create a program
to parse the file and save in the desired format.

Luiz
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal