Click here to Skip to main content
15,881,600 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have many files with the extension *.DAT, I want to retrieve the datas from these files. But I don't know which database the file belongs to.
If i send you one of the file, can you help me ?
Posted
Updated 5-Jan-11 6:31am
v2
Comments
Sandeep Mewara 5-Jan-11 12:27pm    
Is that directed to someone specific?
ANANDHAN steve 5-Jan-11 12:33pm    
No, can anybody help me
Manfred Rudolf Bihy 5-Jan-11 14:49pm    
Do you have any idea how old the software is that produced/worked with these files?
Anyhow look at my answer below. Maybe I landed a lucky punch! :-D
Manfred Rudolf Bihy 7-Jan-11 6:06am    
Glad if I could help! If you don't mind I would really like to know how you worked it out in the end. Either leave a comment on my answer or leave a message in my member profile forum.
Happy coding!

Don't know if this will help you but most database systems embed a "magic number" or signature in the first few bytes of the file.

Executable files for instance starts with MZ, a legacy from the days of DOS.

Try figuring out if your DAT files starts with a common set of bytes. If they do, you can try serching the net for a database system that use that sequence as its "magic" number.

Take a look at this[^] for a further explaination.

Regards
Espen Harlinn
 
Share this answer
 
v2
Hi Steve,

one idea came to mind hearing that about some *.DAT files. Way back in the first half of the 1990's I had to do with a ISAM DB called BTrieve and I'm pretty sure that there were also some *.DAT files involved. I think it had to do with some files containing the "true" data and other files contained the indexes (*.IDX).

Googling turned up this website that has a tool on it called BtSearch that is able to analyze BTrieve DAT files (Caution: Commercial product!):
BtSearch on www.nssdd.com[^]

Maybe you can google some on your own like: BTrieve DAT convert

Modification:
A quote from this site: The Architecture of BTrieve[^]
"The API likewise remained backwards compatible, with only one feature (split files to separate media) being dropped. At one point, Btrieve's former CEO Ron Harris stated that "The version 1.0 API is still supported in version 6.15, and we're going to keep it forever!" (Kyle, pg 11)."

Sounds promising if your files really are BTrieve files that you'll still be able to read them.
End Modification


Best of luck!

Regards,
Manfred
 
Share this answer
 
v6
Comments
ANANDHAN steve 7-Jan-11 2:17am    
Hi Manfred,

Thanks for your reply. Yes, You have taken me at the right direction. of course these are btrieve files.
Well, '*.DAT' files are not any database files. They are just a file with extension 'dat'. They do not belong to any database.

Have a look at this article of how to read/write a DAT file using C++[^].
 
Share this answer
 
Comments
fjdiewornncalwe 5-Jan-11 12:50pm    
Agreed. I have seen many applications over the years where data was simply stored in a .dat file. You cannot assume that it is from any database at all. Since we have nothing better to work on, open it in notepad... maybe it will even be a plain text file.(highly unlikely, though)
ANANDHAN steve 5-Jan-11 12:52pm    
I have picked these files from one of the medical software, this software is dealing with patient records and administration, so they can't be just text files. I have used the hex editor to see the contents. I want to migrate this client to our software.
Sandeep Mewara 5-Jan-11 12:55pm    
Looks like you totally ignored my answer.
1. They do not belong to any database. Might or might not be able to see content in a notepad (generally you are able to) (Since you were able to open in Hex editor its kind of a text file but not a 'text' file extension.)
2. I already provided an article link that shows how you can read from a DAT file

Try please!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900