Board index » delphi » reading database files without standard extensions

reading database files without standard extensions

Hi,

Ran into a problem trying to write an interface into an application that
was written in Clipper, I think (source code unavailable).  The problem
is this:- the app uses what appears to be standard dbase III or maybe
dbase IV files but the file extensions are NOT .dbf, .ndx, .dbt etc).
Fiddling with the BDE showed that although I can't open these databases
in Delphi with a TTable, I can use local sql to read and write to the
table, except if the table has a memo field (with the accompanying *.dbt
file - which hasn't got a .dbt extension), then even local sql will fail
trying to access the table.  At the same time I noticed that an app like
Excel will import the file as dbase without complaint, even those with
attached memo files.

The question then is, short of trying to rename the memo file, is their
a way that the BDE can be forced to look for other extensions other than
.dbt when attempting to access the seperate memo file of a dbase table,
or alternatively be forced to ignore the memo file altogether (using a
"select" statement with specific field names to exclude memo fields
doesn't work).

Thanks in advance

Jeff.

 

Re:reading database files without standard extensions


Quote
Jeff Brown wrote:

> Hi,

> Ran into a problem trying to write an interface into an application that
> was written in Clipper, I think (source code unavailable).  The problem
> is this:- the app uses what appears to be standard dbase III or maybe
> dbase IV files but the file extensions are NOT .dbf, .ndx, .dbt etc).
> Fiddling with the BDE showed that although I can't open these databases
> in Delphi with a TTable, I can use local sql to read and write to the
> table, except if the table has a memo field (with the accompanying *.dbt
> file - which hasn't got a .dbt extension), then even local sql will fail
> trying to access the table.  At the same time I noticed that an app like
> Excel will import the file as dbase without complaint, even those with
> attached memo files.

> The question then is, short of trying to rename the memo file, is their
> a way that the BDE can be forced to look for other extensions other than
> .dbt when attempting to access the seperate memo file of a dbase table,
> or alternatively be forced to ignore the memo file altogether (using a
> "select" statement with specific field names to exclude memo fields
> doesn't work).

> Thanks in advance

> Jeff.

I have the same problem. There are some choices:
 - hack executable clipper app files and change extensions to standard.
  (I can't do that because app with I integrate Delphi programs is
   well supported and I don't want to do it at every update)
 - hack BDE dlls and change extensions to non standard
  (I can't do that because: 1. Its illegal, 2. I have some projects,
   some uses normal extensions, some not. 3. I want open everything
   what I want, no to change industry standards)
 - set aliases to directories only, use queries like
    select * from 'customer.dat' , and wait for new version
    of BDE explorer, or somebody who has better idea.
  (This is what I do for now)

I think it is most serious limitation to BDE when you want smoothly
change to client/server environment.
Bart.

Other Threads