Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Easy Points: BDE and DBase

Posted on 2002-07-04
5
Medium Priority
?
336 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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 …

718 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