Link to home
Start Free TrialLog in
Avatar of rpaaep
rpaaepFlag for United States of America

asked on

Dbase IV Extract

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
Avatar of Rincewindwizz
Rincewindwizz
Flag of Switzerland image

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

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.)
Avatar of rpaaep

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of rpaaep

ASKER

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
Avatar of rpaaep

ASKER

These were a great help for me.