Board index » delphi » Dbase IV to Dbase III

Dbase IV to Dbase III

A friend of mine with a sizeable Delphi application
wishes to convert its principle data files from Dbase
IV to Dbase III for several reasons.

He wants me to ascertain independently, whether the
programming changes are not extensive and that the
costs of any additional tools required, are modest.

The indexes are to be to the FoxPro CDX format and
the memo files FPT types.

Finally, anybody interested in taking on the task?

Nicola

 

Re:Dbase IV to Dbase III


If your delphi app uses BDE to access .dbf tables, then you will find
yourself free for any changes needed for the delphi app.

But your question itself has its own question.....

Briefly, a dbaseIII table is not the same as a FoxPro dbf.

In detail: the main difference among dbaseIV,III,FoxPro table is the
associated index file (CDX/MDX/NDX/NTX etc) and the way memo fields
are stored.  There are subtle difference in the DBF file itself. (only
talking about character/numeric/memo fields)   Borland has stated that
its BDE driver for foxpro is of some bug and data updating is not
recommended.

On Wed, 13 Mar 2002 23:17:36 +0000, Alan Secker

Quote
<alansec...@globalnet.co.uk> wrote:
>A friend of mine with a sizeable Delphi application
>wishes to convert its principle data files from Dbase
>IV to Dbase III for several reasons.

>He wants me to ascertain independently, whether the
>programming changes are not extensive and that the
>costs of any additional tools required, are modest.

>The indexes are to be to the FoxPro CDX format and
>the memo files FPT types.

>Finally, anybody interested in taking on the task?

>Nicola

Re:Dbase IV to Dbase III


Anders, thank you for helping me.

The core of the problem is that the system seems to
crash regularly with corruptions to the data files.
I suspect this is due to poor validation and that
data cleaning is the answer.

Unfortunately, my friend has no tools for handling
this and is dependant upon the subcontractor who
is determined maintain his indispensability.

I am a Clipper programmer but have never used Dbase IV
files and assume that standard dBase III tools will
not do the trick. If that is not the case, then at
least my friend can get by.

Nicola

Quote
Anders Lee wrote:

> If your delphi app uses BDE to access .dbf tables, then you will find
> yourself free for any changes needed for the delphi app.

> But your question itself has its own question.....

> Briefly, a dbaseIII table is not the same as a FoxPro dbf.

> In detail: the main difference among dbaseIV,III,FoxPro table is the
> associated index file (CDX/MDX/NDX/NTX etc) and the way memo fields
> are stored.  There are subtle difference in the DBF file itself. (only
> talking about character/numeric/memo fields)   Borland has stated that
> its BDE driver for foxpro is of some bug and data updating is not
> recommended.

> On Wed, 13 Mar 2002 23:17:36 +0000, Alan Secker
> <alansec...@globalnet.co.uk> wrote:

> >A friend of mine with a sizeable Delphi application
> >wishes to convert its principle data files from Dbase
> >IV to Dbase III for several reasons.

> >He wants me to ascertain independently, whether the
> >programming changes are not extensive and that the
> >costs of any additional tools required, are modest.

> >The indexes are to be to the FoxPro CDX format and
> >the memo files FPT types.

> >Finally, anybody interested in taking on the task?

> >Nicola

Re:Dbase IV to Dbase III


Hmm.

When I tried this i had difficulty getting tables from dBase iv to iii
format.  Although I got ndx indexes working i couldn't get real dbase
iii to open the tables created by the database desktop.  So I'd create
empty tables, make sure they can be opened by anything you want to work
with them in, then copy the data into the new tables.  Then I'd create
indexes etc and re-check.  I'd try to use dbase (append from...) or
foxpro to do this, whichever format you are planning to use.

Then I'd replace the TTable/tquery with either TDBF components or
advantage components (which work with Clipper or Fox tables, I think).

I'd prefer advantage for that reason.  Also it comes with advantage data
architect, which can create and manipulate the tables.  It is free for
local use and not that expensive for server deployment.

This would have the advantage of getting rid of the BDE (the uses clause
will need editing to get rid of dbtables or it will still look for the
BDE at start up).

The BDE won't use dbase iii indexes I think, so BDE is out.  Nor will it
work with Foxpro - read only.

How much work involved depends on how complex the app is.  If it was
mainly components dropped onto forms then Gexperts replace components
feature might do all the conversion for you.  If there was a lot of hand
written code to make it work then there is a lot of work.

All in all this isn't certain to be a trivial task.  It might be worth
looking at going over to ADO, assuming there is a foxpro ole-db
provider.  That way the next change should be a ten minute job <G>.  I
think that would be a better return on effort.

Re:Dbase IV to Dbase III


On Sat, 16 Mar 2002 09:30:56 +0000, Andrew Skinner

Quote
<skin...@summerfld.demon.co.uk> wrote:

Because of a simular problem I did the following
I let Delphi's database desktop  build the dBase3 table Borrowing the structure
of the original dBase4 table.
then I used DBFTOOLS (freeware)  to append all the records from one table to the
other.
To see if it really worked I used Clippers DBU (dBase3)  and it worked well.
to rebuild NTX indexes you can use Clipper  or dBase for NDX indexes
Quote
>Hmm.

>When I tried this i had difficulty getting tables from dBase iv to iii
>format.  Although I got ndx indexes working i couldn't get real dbase
>iii to open the tables created by the database desktop.  So I'd create
>empty tables, make sure they can be opened by anything you want to work
>with them in, then copy the data into the new tables.  Then I'd create
>indexes etc and re-check.  I'd try to use dbase (append from...) or
>foxpro to do this, whichever format you are planning to use.

>Then I'd replace the TTable/tquery with either TDBF components or
>advantage components (which work with Clipper or Fox tables, I think).

>I'd prefer advantage for that reason.  Also it comes with advantage data
>architect, which can create and manipulate the tables.  It is free for
>local use and not that expensive for server deployment.

>This would have the advantage of getting rid of the BDE (the uses clause
>will need editing to get rid of dbtables or it will still look for the
>BDE at start up).

>The BDE won't use dbase iii indexes I think, so BDE is out.  Nor will it
>work with Foxpro - read only.

>How much work involved depends on how complex the app is.  If it was
>mainly components dropped onto forms then Gexperts replace components
>feature might do all the conversion for you.  If there was a lot of hand
>written code to make it work then there is a lot of work.

>All in all this isn't certain to be a trivial task.  It might be worth
>looking at going over to ADO, assuming there is a foxpro ole-db
>provider.  That way the next change should be a ten minute job <G>.  I
>think that would be a better return on effort.

Re:Dbase IV to Dbase III


I missed the first part of this discussing, but I think
I would be correct in pointing out the following:

The BDE will in fact work just fine with dBASE III+ tables,
but to create them as the default for new tables, you may
need to set the "Table Level" in the BDE configuration
utility.

The BDE's support for FoxPro and Clipper indexes has never
been quite right, and probably never will be.  If you need
to use FoxPro or Clipper indexes, look for an alternative
database engine; see the links at http://www.kylecordes.com/
--
Rick Carter
carte...@email.uc.edu   Rick.Car...@ParadoxCommunity.com
Chair,   Paradox/Delphi SIG,   Cincinnati PC Users Group

Re:Dbase IV to Dbase III


I had trouble getting dBase III to open tables made in this way.  That
was why I suggested doing a bit of testing before wasting a lot of time
developing. I'll look for dbftools.

Andrew.

Quote
Frits v/d Laan wrote:

> On Sat, 16 Mar 2002 09:30:56 +0000, Andrew Skinner
> <skin...@summerfld.demon.co.uk> wrote:

> Because of a simular problem I did the following
> I let Delphi's database desktop  build the dBase3 table Borrowing the structure
> of the original dBase4 table.
> then I used DBFTOOLS (freeware)  to append all the records from one table to the
> other.
> To see if it really worked I used Clippers DBU (dBase3)  and it worked well.
> to rebuild NTX indexes you can use Clipper  or dBase for NDX indexes

> >Hmm.

> >When I tried this i had difficulty getting tables from dBase iv to iii
> >format.  Although I got ndx indexes working i couldn't get real dbase
> >iii to open the tables created by the database desktop.  So I'd create
> >empty tables, make sure they can be opened by anything you want to work
> >with them in, then copy the data into the new tables.  Then I'd create
> >indexes etc and re-check.  I'd try to use dbase (append from...) or
> >foxpro to do this, whichever format you are planning to use.

> >Then I'd replace the TTable/tquery with either TDBF components or
> >advantage components (which work with Clipper or Fox tables, I think).

> >I'd prefer advantage for that reason.  Also it comes with advantage data
> >architect, which can create and manipulate the tables.  It is free for
> >local use and not that expensive for server deployment.

> >This would have the advantage of getting rid of the BDE (the uses clause
> >will need editing to get rid of dbtables or it will still look for the
> >BDE at start up).

> >The BDE won't use dbase iii indexes I think, so BDE is out.  Nor will it
> >work with Foxpro - read only.

> >How much work involved depends on how complex the app is.  If it was
> >mainly components dropped onto forms then Gexperts replace components
> >feature might do all the conversion for you.  If there was a lot of hand
> >written code to make it work then there is a lot of work.

> >All in all this isn't certain to be a trivial task.  It might be worth
> >looking at going over to ADO, assuming there is a foxpro ole-db
> >provider.  That way the next change should be a ten minute job <G>.  I
> >think that would be a better return on effort.

Other Threads