Link to home
Start Free TrialLog in
Avatar of qas
qas

asked on

Easy Points: BDE and DBase

Here is an easy one:  What am I doing wrong with my BDE connection ?  

I try to access a DBase database with a Delphi 4 application using BDE (ver 5.01).  I configured a standard connection, made the path point to the correct directory and changed the default drivers to DBASE.  

I just put a TTable component and a button on a form and the error gets raised when I try to open the table component (Table1.open;).  I figure that the DatabaseName property of the table is correctly set to the BDE entry since I get all the tables listed in the TableName combobox.

The error raised says (this is translated from french so I hope it is still accurate): «The application raised an EDBEngineError with the message 'Incorrect file name'»

What did I missed ?
Avatar of qas
qas

ASKER

Before I forget:  yes, I tried to see if the .dbf files are corrupted by opening them by hand (I used Paradox 9.0) and nothing looked wrong.
Well you must configure as Dbase and not as standard and then in the DabaseName you must put and alias previously created or the path your Database:
MyAlias

or

C:\SaintMalo\CiteCorsaire\

And then you must write in the TableName property of your Ttable the name of your Database, thats all.

Un grand salut pour la France.
Au revoir
Marcos.
Avatar of qas

ASKER

Hello Marcos and thanks for the comment.

Here is what I did:  I started BDE administrator and created a new Database Alias using Microsoft DBase Drivers (*.dbf).  By default, it got ODBC1 as an alias name.  Then I wrote the directory of my database in the DATABASE NAME field (K:\Logiciels Avantage\Expansion\AVA01\).  I did not make any more changes and saved.

In Delphi, I changed the DatabaseName property of Table1 to ODBC1 and selected from the list the correct TableName.

I get another error when the table gets openned.  The message (still translated) looks like this:  «The application raised an EDBEngineError with the message 'Incorrect configuration parameter'»

Note that in the DATABASE NAME field, the [...] button lets me browse for a FILE and not a DIRECTORY like it should.  I have to remove the file name so that the path gets ok.

Any hints ??

P.S.
I'm from Trois-Rivières, province of Québec, which is the eastern french part of Canada.  Sorry, I don't know anyone from France!!
ASKER CERTIFIED SOLUTION
Avatar of marcoszorrilla
marcoszorrilla

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
Avatar of qas

ASKER

Thanks alot!

The problem was the space in the path (between "logiciel" and "avantage").

Problem solved!!