?
Solved

Dbase IV Extract

Posted on 2009-12-19
10
Medium Priority
?
1,468 Views
Last Modified: 2013-11-24
Hi,

I am trying to extract a DB in the above file formats while being able to also read the key fields when the extract is done.  I would like to get these into an SQL DB so I can create some queries on the records.  I did try the ABC Clarion tool for .DAT files but it did not recognize the files.

This runs in a DOS Window and is a Dbase IV application.

Any help, pointers and tips would be appreciated.

Thanks,

Robert
0
Comment
Question by:rpaaep
  • 3
  • 3
  • 3
  • +1
10 Comments
 
LVL 3

Expert Comment

by:Rincewindwizz
ID: 26087636
If you have dBase there are a number of commands that will help
COPY is good.
COPY TO filename FIELDS <field list> WHILE <condition>|FOR<condition> TYPE <SDF|DIF|SYLK|WKS>
or
COPY TO filename FIELDS <field list> WHILE <condition>|FOR<condition> TYPE <DELIMITED WITH <char>

If you do not have dBase , the most common approach is to read the database file with Excel and then manipulate it however you want.

In either case all fields are read.

The index expression (some combination of some of the fields in the database) are defined in each index file
If you have dBase you can display the index with the commands
USE <databasename> index <indexname>
Display Status

If you do not have dbase, the index formula can usually be read by opening the file in a text editor (e.g. notepad). The index expressions and field names

Gotta rush
HTH

0
 
LVL 43

Expert Comment

by:pcelba
ID: 26087817
What SQL DB do you have?

If you have SQL Server 2005/8 then you may download VFP OLE DB provider (http://www.microsoft.com/downloads/details.aspx?FamilyID=E1A87D8F-2D58-491F-A0FA-95A3289C5FD4&displaylang=en) and use it to create Linked server to DBF data in SQL. Then you may read DBF data by SQL commands or by OPENQUERY().

Another possibility is to open DBF file in some other RDBMS like Access or Visual FoxPro and export it to SQL Server via ODBC connection.

BTW, your question tag is ".DAT and .IDX". This extensions are not used in dBase IV. dBase IV data are stored in .DBF, index is .NDX or .MDX, memo file .DBT so, are you sure about dBase IV ?

IDX extension is used as index file by Microsoft FoxPro, Corel QuickFinder, ESRI ArcView, ICQ, and other programs. Many programs create, open, or reference .DAT files (e.g. Btrieve database, Clarion DOS database, DataFlex, etc.)
0
 

Author Comment

by:rpaaep
ID: 26087827
Hi,

Thanks for the response.  I only have the Dbase exec but would get the program if I could find it.  

I tried using Excel and it cannot see the .dat file.  Per the list of files it can only see a .dbf file.

I have .DAT and .IDX files.

Another other ideas would be greatly appreciated.

Robert
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 43

Accepted Solution

by:
pcelba earned 1000 total points
ID: 26087855
I am almost 90% sure it is not dBase. It could even be Cobol or whatever.

You can look at files yourself by e.g. Notepad - you'll see unstructured data and you could decide if the structure is readable by some VB or C program but that's all you can do now. Don't save such file by Notepad! Better is some hexadecimal viewer/editor.

0
 
LVL 9

Assisted Solution

by:Lieven Embrechts
Lieven Embrechts earned 500 total points
ID: 26087875
did you try to open the .dat file with notepad or a hex-editor
to see if you can find some indications about the exact format ?

you could also try cvvt-tool & procedure from following webpage:
http://www.toppsoft.com/tas-convert.html
0
 
LVL 3

Expert Comment

by:Rincewindwizz
ID: 26089940
well you can get dbase on ebay of you want to. Try
here  http://shop.ebay.com/?_from=R40&_trksid=p3907.m38.l1313&_nkw=dbase&_sacat=See-All-Categories

But pcelba is probably correct when he says its not a dbase file. If its a reasonable size file, you can Zip it and post it here and maybe we can give you an idea of the program that created it.

If you cannot see the .DAT file in Excel make sure you select 'All Files *.*'. Its at the top of the list in the drop down box by 'Files of Type' on the File Open dialog box.

If Excel will not open it, its not a dBase file as others have suggested.
0
 

Author Comment

by:rpaaep
ID: 26093710
Well, I don't know how to say this but since I took over this project I was directed to a directory with the .DAT and .IDX files. With this problem I did some more review and found a file where I could see what the exe was doing.  It pointed me to the actual directory with .DBF and .MDX files in it.  So, I opened the file and can see all the data fields but I am not able to see the key/index fields as they appear to be in control characters or hex values.  I just see strange characters.

I was unable to attached the DBF and MDX - they would not let me on this site.  I have pasted an image in a word file.  Hope it helps.

Thanks for any help.

Robert

DFBFile.doc
0
 
LVL 3

Assisted Solution

by:Rincewindwizz
Rincewindwizz earned 500 total points
ID: 26094175
Upload files:   You can upload the files if you rename them.
For example, make database.dbf into database-dbf.doc and the index into database-mdx.doc
The list of allowed extensions is next to teh add file button.

MDXviewer: There is a free piece of software out there which views MDX files.  
See http://alxsoft.narod.ru/ENG/mdxview.htm.
Sadly I cannot make the link work but there is an email address for the author.



0
 
LVL 43

Expert Comment

by:pcelba
ID: 26094541
This is probably problem of the viewer. We may tell more if you send the DBF (renamed to TXT and zipped). Some column encryption is another possibility, of course.

You don't need to know MDX file contents for your task. Simply try to open DBF file in Access (as linked table), Visual FoxPro etc. and export it to SQL.
0
 

Author Closing Comment

by:rpaaep
ID: 31668106
These were a great help for me.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll look at how you can use a backup to start a secondary instance for MongoDB.
What we learned in Webroot's webinar on multi-vector protection.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question