DBD cannot read my dBase files 
Author Message
 DBD cannot read my dBase files

I used a BatchMove component, to create a dBase-table,  but I could
not open this with Database Desktop (Invalid parameter) nor with the
Excel, which was the main target.  Paradox-tables work Ok for the
following, but dBase not:

  FileName := 'table.dbf'; // 'table.db' is Ok -> Paradox
  FBackupTable := TTable.Create(Self);
  FBackupTable.DatabaseName := ExtractFileDir(FileName);
  FBackupTable.TableName := ExtractFileName(FileName);

  with TBatchMove.Create(nil) do
  try
    Source := table;  // table is an Interbase-table
    Mode := batCopy;
    Destination := FBackupTable;
    Execute;
  finally
    Free;
  end;



Mon, 26 Mar 2001 03:00:00 GMT  
 DBD cannot read my dBase files
Quote:
>   FileName := 'table.dbf'; // 'table.db' is Ok -> Paradox
>   FBackupTable := TTable.Create(Self);
>   FBackupTable.DatabaseName := ExtractFileDir(FileName);
>   FBackupTable.TableName := ExtractFileName(FileName);

You should add something like
    FBackupTable.TableType := ttDBase;

in here..

Qapla'

Thomas Minor



Mon, 26 Mar 2001 03:00:00 GMT  
 DBD cannot read my dBase files

Quote:

> >   FileName := 'table.dbf'; // 'table.db' is Ok -> Paradox
> >   FBackupTable := TTable.Create(Self);
> >   FBackupTable.DatabaseName := ExtractFileDir(FileName);
> >   FBackupTable.TableName := ExtractFileName(FileName);
> You should add something like
>     FBackupTable.TableType := ttDBase;

No, it's not that. When Tabletype is ttDefault, and extension is
'dbf', the table becomes a dBase table.  I was able to open the tables
with DB Explorer, which told me they are 'Visual dBase 7'-tables.  My
Excel is 7.0, but does not understand the tables correctly.  Are there
any options that I should use.

I thought dBase-tables should be no trouble for Excel...



Mon, 26 Mar 2001 03:00:00 GMT  
 DBD cannot read my dBase files

Quote:

> No, it's not that. When Tabletype is ttDefault, and extension is
> 'dbf', the table becomes a dBase table.  I was able to open the tables
> with DB Explorer, which told me they are 'Visual dBase 7'-tables.  My
> Excel is 7.0, but does not understand the tables correctly.  Are there
> any options that I should use.

Well, I solved the problem.  The key was the dBASE version of the
tables, which can be set from BDE Administrator driver-settings.  I
changed DBASE-Level from 5 to 4 to create dBASEIV 2.0-tables.   These
are swallowable by Excel and DBD.

Could this be done in Delphi-code?



Mon, 26 Mar 2001 03:00:00 GMT  
 DBD cannot read my dBase files

Quote:

> > No, it's not that. When Tabletype is ttDefault, and extension is
> > 'dbf', the table becomes a dBase table.  I was able to open the tables
> > with DB Explorer, which told me they are 'Visual dBase 7'-tables.  My
> > Excel is 7.0, but does not understand the tables correctly.  Are there
> > any options that I should use.

> Well, I solved the problem.  The key was the dBASE version of the
> tables, which can be set from BDE Administrator driver-settings.  I
> changed DBASE-Level from 5 to 4 to create dBASEIV 2.0-tables.   These
> are swallowable by Excel and DBD.

> Could this be done in Delphi-code?

To continue answering my own questions: at least it is possible to
changed the registry entry, which is can be done with the following script:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Database Engine\Settings\DRIVERS\DBASE\TABLE CREATE]
"LEVEL"="4"

But, is there any DbiXXX-call to do this?  At least I couldn't find
such.



Mon, 26 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. dBase BDE cannot read fully, MS products can!!

2. Text File Read / Dbase file Write

3. Cannot save and read record from the file

4. Detach dBase Index without DBD ?

5. Problem reading dbase III files - corrupt table/index header

6. READ/WRITE DBASE files from BP 7.0

7. Read/Write DBASE files with BP 7.0

8. BTRIEVE file access under delphi/DBD

9. I cannot read CLPB!!!

10. Delphi: Cannot read different floppy disks? (Repost)

11. Delphi: Cannot read from different floppy disks?

12. cannot read numeric value from a table

 

 
Powered by phpBB® Forum Software