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!

Old DOS Database In Delphi 5

Status
Not open for further replies.

TBaz

Technical User
Jun 6, 2000
65
ES
I've been asked to look into the possibility of converting an old DOS program to Windows by my brother-in-law. I have been given a copy of the old program directories on CD to play with.

I'm not 100% sure, but I believe that the old database files are v4.x Paradox For DOS .DB files (if the exact version matters at all that is).

My Delphi coding is OK, but I'm going to have to do a fair bit of learning with databases as I have little experience in that side of things.

I've tried loading one of the .DB files using DB Desktop and it says that the headers are corrupted. I'm not sure if this is because of version incompatibility or that the CD is simply corrupted.

So, the question is:

Should I be able to use the existing .DB tables directly from Delphi 5 code (and my CD is duff), or should I convert them first to a later Windows version of Paradox?

If conversion is the way to go, is there any free/cheap/easy way to go about it?

Regards and thanks...

Baz


 
1 thing to check is that the files are not read only.

sometimes when you burn to cd the files get set to read only
so copy them from the cd and turn read only off.

other than that i cant help (sorry)

maybe someone else will have an idea.

Aaron Taylor
John Mutch Electronics
 
Delphi 5 Pro supported Paradox and dBase via the BDE, and it should be able to read them. Database Desktop has hardly changed since D5, so that shouldn't be an issue. If you can read them with this app, then D5 will work fine.
A quick look at the ODBC setup in WinXP shows it can read v3 to v5 of Paradox.

Aaron is correct in asserting the R/O status should be adjusted as Paradox doesn't like locked files.

Finally, database coding has some basic rules which are better described elsewhere. Check out the FAQs here for assorted links, and the database course at
I can't recall the level of support for ADO with D5, but that's another way to approach this - and there is good help on ADO at the above web site. I use ADO quite a bit to read dBase and CSV files without the need for the BDE on machines my software is loaded on - thats because its built into the operating system via MDAC.

Good luck

Cheers,
Chris [pc2]
 
Thanks for that.

The CD must have been corrupted because I had problems copying the contents to hard disk so I've been and got a new copy of the data on CD.

At least I now know that I should be able to use the old database files in the new program. :)

Baz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top