Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

database format

Status
Not open for further replies.

neo6297

IS-IT--Management
May 14, 2004
2
US
How do you tell what language a database is written in. For example, the database I am dealing with has a main folder with tables with the extension .dat no data in this table though. But there is a secondary folder with files containing the actual data with extensions of .dat and .idx. These files do not represent a table layout at all. What I would like to do is create .idx file and .dat file with my own data that I asuume would populate the actual table when the call is made to open the database I need. hmm does that make sense at all? Any help determining what code language I am deeling with would be great.
 
> How do you tell what language a database is written in.
You can't.

Any language which is capable of writing any byte value to a file would be capable of creating those files.

What you need to do is figure out what all those bytes mean (this is called reverse engineering), so that you can create a compatible application which creates files in the same format.

Some people make this easy, by actually publishing details of file formats, so other people like yourself can easily create files as well.

If you're not in that position, then its down to a lot of trial and error.

--
 
Great so basically there is no easy way to tell what a database is written in to open and examine the code. Thank your for your post and input though I do appreciat it and am always open to suggestions.

 
But you know which application created those files in the first place right?
Otherwise, where did you get those files?

Opening the files is easy, you just do
Code:
FILE *fp = fopen( "file.idx", "rb" );

Instead of going to the trouble of working out what all the database files are, how about creating your C program to generate files in a format which your database can import.

A good example is the CSV format file, which many spreadsheet and database applications can read, and its all text, so its also easy to generate (and check).

--
 
Status
Not open for further replies.

Similar threads

Replies
3
Views
56
Replies
1
Views
44
Replies
1
Views
49
Replies
3
Views
62

Part and Inventory Search

Sponsor

Back
Top