Solved

Easy Points: BDE and DBase

Posted on 2002-07-04
5
331 Views
Last Modified: 2013-11-24
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 ?
0
Comment
Question by:qas
  • 3
  • 2
5 Comments
 

Author Comment

by:qas
ID: 7130380
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.
0
 
LVL 3

Expert Comment

by:marcoszorrilla
ID: 7130400
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.
0
 

Author Comment

by:qas
ID: 7130427
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!!
0
 
LVL 3

Accepted Solution

by:
marcoszorrilla earned 50 total points
ID: 7130542
Try this:
1º.- Create an alias
Name:BlaBla
Driver Type:Standard.
Path:C:\Quebec

Now:
Open a new project and in the form drag a Ttable control
DabaseName:BlaBla
TableName:Push and you could see all the Dbf Tables, simply choose one of them
TableType:ttDbase.

Dobleclic in the active property from the Table, et Voilà, the table is open.

Now drag a Tdatasource and connect it with your table.
Drag a Dbgrid and do the same and you can see the data from this table.

Grand salut por le Quebec et le Canada.
Mes homages.
Marcos.
0
 

Author Comment

by:qas
ID: 7130554
Thanks alot!

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

Problem solved!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Access 2003 or later To MySQL Migration Project Hello All, this is my second article in the category of MS-OFFICE Automation. In internet I am not able to find any comprehensive resource on the Migration of MS Access back-end to MySQL so I fin…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question