How to read .DAT and .IDX files using C Tree

10.4k views Asked by At

I've got a program that I am trying to get data out of. I have been unable to find any sort of Database file to open. In the parent directory of the program there are a bunch of .DAT and .IDX files.

The program also installed the C-Tree GUI tools, both the ISAM and SQL explorers. I believe the files are ISAM, but I cannot find an over arching DB file to connect to, and all of my connections via C-Tree get rejected, so there doesn't seem to be any database installed, just a bunch of .DAT and .IDX files

Is there a way to open these files, import them into SQL, anything? I need to be able to query them and grab specific data, but so far I have been unable to open them. Any ideas?

UPDATE: I installed the C Tree ODBC and now I'm wondering if there is a way for me to point the ODBC at the files/folder instead of a database engine (since there's not one)

2

There are 2 answers

0
jhagen On

If you have C source files, look for the InitISAM() function call that is used to set up buffers. That is always the first function to call before reading and writing the CISAM files.

3
suspectus On

Using old traditional c-tree one would write a C program which included the file definition of the data and index table(s). If you have this code you can set up ISAM explorer to access the files. Alternatively, you may be able to determine the file layout by reading the raw .dat file then using ISAM explorer for convenience.

As you have version 10 it's likely that the tables contain a table definition (DODA) record which will permit them to be read by the c-tree server.

First start the c-tree server program ctreeSQL. Then try these commands to see if the table(s) are SQL enabled:

ISQL -u ADMIN -a ADMIN ctreeSQL

ISQ>SELECT * FROM isam_table;