Solved

Easy Points: BDE and DBase

Posted on 2002-07-04
5
325 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

896 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now