Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / General DB Topics / April 2005

Tip: Looking for answers? Try searching our database.

Dat File Database Format??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
B-Dog - 05 Apr 2005 16:03 GMT
I have an old dos program that uses dat files to store the data and I'm
trying to convert to dotnet.  I'd like to be able to import the data into an
access database but I don't know which format the dat files are in.  Here is
the first few lines of the dat file.  If anyone could help me figure out
which type this is it would be greatly appreciated.

????    ?     
?f?"?  Mr  John      Smithh              Parkside Jewelers
1776 Parkside Blvd.                 San Diego           CA92001Radio
619-555-8837     619-555-8113
?Former Name: Discount Jewelers
J???                                                            ?
u?"GY$Ov?"                X                                           N
2344 Parkside Jewelers             P.O. Box 33847                San
Diego, CA 92003
?n"!?       Manager                        Save-At Drug Store
758 Some Street                     Los Angeles         CA90049
?(sample customer)

PO Box 345                    Brentwood Ca 90049
uu?"?       Frank     Jones               bABC Company
123 Washington St                   San Diego           CA92111
619-444-1234     619-523-4321
?t?$       Jennifer  Kaszemi                                           
Atascocita Place Drive       Humble              TX77346
281-234-4328


?v?"?                                       Joe's Garage
11052 El Camino Real                Oceanside
                   -w?$        Paul      Gilbert              44 Good
Stree               44 Good Street
Bay St. Louis       MS39520       601-444-6323
?s?$   WandWandas     Rodgers             JWAR Information Services
3453 F.M. 1960 ByPass #7           Humble              TX77338
281-444-1339
?v?$       Stan &    Erle Stadnicking
44 Good Street
Bay Shadow          MS39520       621-237-6323

oy?$|       Luis      Gonzalez
Atascocita Lakeway            Humble              TX72246
221-322-3773
?

Xu?$?
Lemming - 26 Apr 2005 11:24 GMT
>I have an old dos program that uses dat files to store the data and I'm
>trying to convert to dotnet.  I'd like to be able to import the data into an
>access database but I don't know which format the dat files are in.  Here is
>the first few lines of the dat file.  If anyone could help me figure out
>which type this is it would be greatly appreciated.

[snip file contents]

Is the old DOS program a home-grown one, or an off the shelf package?
If home-grown do you have access to the source code?  If it's a
package, you could try searching on http://www.wotsit.org although
there is only one ".dat" type file listed, for DataFlex:
http://www.wotsit.org/search.asp?s=database.

Failing all that, reverse engineering the file ought to be possible,
judging from the chunk you posted.  Try using a hex editor rather than
trying to view the file as plain text.

Do you think this file contains only a single record type, or are all
record types for the application held in this file?  Are there any
files of other types, e.g. indexes or other control files?

The likelihood is there will be a header block, containing information
such as file version, length of file, possibly pointers to the first
data record and the first deleted record and "other stuff" which you
may or may not be able to work out the function.  After that I'd
expect to see the records.  The binary embedded in the records
themselves are either numeric fields, or control information.  If the
former, then it should be reasonably trivial to work out the record
length and go from there.  if the latter then you likely have variable
length records, and so you should expect to see a record header block
containing the overall record length, plus field headers for the
variable length fields.  It will be quite time-consuming, but it ought
to be possible.

If you still have the original application, you could compare what it
shows you on screen with what is in the file and use that as a clue to
the file contents.  Alternatively, ow many records are there?  If
there aren't too many it might be quicker/simpler just to copy the
data from the old application to the new one by hand.

Lemming
Signature

Curiosity *may* have killed Schrodinger's cat.

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.