After the BDE is installed, it must be configured - normally using the BDE Administrator - to define the aliases that are used to specify the databases. (ODBC, ADO, and the like also require similar configuration.) (An API allows configuration to be made programatically.)
In general, when I write programs, I currently use ADO to perform this function because its functionality is built into the current MS Windows operating systems, and, therefore, I don't have to worry about installing the BDE for my applications to work.
BDE Administrator
A yellow-green box around an icon means that the connection is working (open) and that you can get data about the tables and fields in that database.
A green arrow means that the alias definition has been edited but is not yet saved (applied).
Parameters with bold letters can not be changed.
Adding a new alias
Paradox DBase FoxPro ASCIIDRVOnce a new alias is added via the control panel, you need to close and re-open Delphi in order to see it via Database / Explore.
Borland provides sample Paradox, dBase, and Interbase/Firebird databases under
C:\Program Files\Common Files\Borland Shared\DataWhen connecting to these over a network, and when the fileserver is NT, 2000, or XP, you will probably have to add Write and Change (or Modify) to the default directory permissions for Everyone.
Paradox Databases
To create a new alias, follow the instructions above, select the Standard driver, and set the following parameters.
Property | Value | Comments |
---|---|---|
Default Driver | Paradox | Select this from the pick list |
Path | This is the directory that contains the tables (*.db files) |
PDOXUSRS.NET
Typically, PDOXUSRS.NET and the databases are all on the database server,
but in different directories.
However, they do not have to be on the same machine.
When several database servers are used, one of them is normally selected
for PDOXUSRS.NET and none of the databases can be used
if that server is
Locking problems are usually caused by misconfiguring one of these. If these rules are not followed, then there are severe locking problems.
In English, what this means is that every system on the network must have the drive containing the database mapped to the same drive letter. If one system has the database mapped to drive-p, then every computer with access to that database must also have it mapped to drive-p. In addition, the path to the lock file must be the same on all the machines
You must be sure that the computer that actually hosts the database does not use a local drive letter (such as the c-drive). If the database is accessed via p:/myTables on one machine, it must use the same path on all the machines.
Setting the PDOXUSRS.NET file path
Configuration / Drivers / Native / Paradox / Net Dirto the location of PDOXUSRS.NET.
Notice that PDOXUSRS.NET is not associated with a specific database. When there is more than one Paradox database, then they all share the single PDOXUSRS.NET file.
MS Access Databases
With MS Access tables, the BDE implies that you have access to 5 internal MSys* tables, however, only MSysAccessObjects can actually be read. (I don't suggest modifying this ... just look.)
The BDE provides an MS Access interface, or you can select the appropriate ODBC driver.
To create a new alias using the BDE driver, follow the instructions above, select the MSACCESS driver, and set the following parameter.
Property | Value | Comments |
---|---|---|
Database Name | This is the fully qualified *.mdb file |
To create a new alias using the ODBC driver, follow the instructions above, select the appropriate ODBC driver ("Microsoft Access Driver (*.mdb)" on my system), and set one of the following parameters.
Property | Value | Comments |
---|---|---|
Database Name | This is the fully qualified *.mdb file | |
ODBC DSN | This is the ODBC alias name |
FoxPro Databases
To create a new alias, follow the instructions above, select the Standard driver, and set the following parameters.
Property | Value | Comments |
---|---|---|
Default Driver | FoxPro | Select this from the pick list |
Path | This is the directory that contains the tables (*.dbf files) |
Firebird/Interbase Databases
To create a new alias, follow the instructions above, select the INTRBASE driver, and set the following parameters.
Property | Value | Comments |
---|---|---|
Server Name | This is the fully qualified *.fdb or *.gdb file | |
User Name | SYSDBA | For employee.gdb, the default password is masterkey |
Warning: | If the focus is in an Opened Interbase/Firebird table when Object / New... is selected, it is possible that you will create a new table or a new field instead of a new alias. |
To connect to a remote firebird server, you MUST include the drive letter after the computer name.
CompName:C:\Program Files\Common Files\Borland Shared\Data\employee.gdbThe Interbase help says that the following format is also acceptable in ISQL - but it definitely does NOT work in the Database Explore.
\\CompName\C:\Program Files\Common Files\Borland Shared\Data\employee.gdb
Firebird is the open source version of Borland's Interbase database server.
ODBC Connection
Under Control Panel / ODBC (the exact path is OS dependent), create a System DSN alias based on INTERSOLV Interbase ODBC Driver (*.gdb). The Data Source Name is the ODBC alias name that you create. In order to use the sample database on a remote server, set Database Name to
CompName:C:\Program Files\Common Files\Borland Shared\Data\employee.gdbIn the BDE Administrator, add a new BDE alias using the INTERSOLV InterBase ODBC Driver and enter the new ODBC alias name in ODBC DSN.
The ODBC Data Source Administrator is also available from the Database Explorer menu via Object / ODBC Administrator...
Author: Robert Clemenzi - clemenzi@cpcug.org