Solved

Easy Points: BDE and DBase

Posted on 2002-07-04
5
321 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks alot!

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

Problem solved!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

763 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

7 Experts available now in Live!

Get 1:1 Help Now