PDA

View Full Version : Setting the database for an BDE-Interbase-alias



NewsArchive
06-03-1997, 12:00 AM
Hello everybody,

We want to make a setup for our application but we have the following
problem.
The Interbase-database is enclosed in the install-set and is placed in a
subdirectory of the InstallDir.

To let the application work with the database we have to make a new
Alias in the BDE. But how can we make that alias point to the
database??????

After installing the database of the new alias is set to :
IB_SERVER:/PATH/DATABASE.GDB

Who can help us?

NewsArchive
06-03-1997, 12:00 AM
Hello,

Below is a Knowledge Base article which contains infromation for creating
aliases.
Also refer to Knowledge Base article X1038 which can be found at
installshield
web site.
Dan

How to install the Borland Database Engine and BDE aliases with your
Express setup.

----------------------------------------------------------------------------
---------------------------------------------
DISCUSSION:
----------------------------------------------------------------------------
---------------------------------------------
Overview

The Borland Database Engine (BDE) is the core software in Borland database
products and in deployable applications built with Borland development
tools (BDE applications). BDE supplies Windows application developers with
a direct and shared access to multiple data sources.

The set of database drivers included with BDE enables access to the
following standard data sources: Paradox, dBase, and ASCII text databases.
In addition, Borland's SQL Links product provides access to a number of SQL
servers, the most common of which are InterBase, Oracle, and Sybase.
Microsoft ODBC drivers can also be added as needed.

InstallShield Express currently supports three of the Borland development
environments which use BDE: Borland C++ 5.0, Delphi 2.0, and Paradox 7.0
(with Borland Local Interbase and Visual dBase possibly forthcoming).
Automatic BDE installation is provided in the Express custom editions that
are available for each of these development tools, and is also included for
all three of these platforms in the Express Professional version. While the
custom editions support only 32-bit BDE setups, Express Professional will
install both 16- and 32-bit BDE.

Using BDE in a Borland Application

To reference a data source that it requires, a BDE application employs a
user-defined name for this data source called an "alias." The alias name
and the table of data to which it refers are specified within the code of
the BDE application itself. However, to allow for portability and easy
modification, neither the path to this data table nor the database driver
necessary to make the connection is listed in the application's code. This
information is instead entered into the BDE Configuration Utility, which is
a redistributable application used to set up and manage the configuration
of BDE applications. It contains parameters for BDE system configuration,
database aliases, database server drivers, and ODBC connectivity.

For example, as a Delphi 2.0 developer, you may want to retrieve data from
a dBase table for use in your application. Within your source code, you
would enter MydBaseAlias as the name you want to give this alias, along
with the name of the data table to which you want to gain access. Since a
dBase database file can only contain a single table of data, you would
enter the name of the entire file, "MyData.dbf," as the data table's name.

Next, you would need to add this new alias to the BDE Configuration Utility
on your system. You would enter MydBaseAlias as the Alias Name, and then
supply the path under which this alias's data source is located on your
hard drive or a network. Since the data table used by this alias is a
complete file, and this file's name has already been listed in the BDE
application's source code, it is only necessary to enter the path to the
database file here, and not the file itself. As this data source is a DBase
file, you would choose Standard as its Alias Type, and then dBase must be
selected as the Default Driver from a dropdown menu containing the standard
BDE data source types: dBase, Paradox and ASCII Text. Type, Path and
Default Driver are the only three parameters required by the BDE
Configuration Utility for any BDE alias which uses a standard data source
type.

If an alias which references a SQL Server data source, such as Interbase,
is to be included in a BDE application, the name of the required data table
is listed in the application's source code instead of the name of the
entire Interbase file. This is because an Interbase database file can
contain more than one table of data. When adding this alias to the BDE
Configuration Utility, its Type, of course, is entered as Interbase, but
its Path parameter is left empty. For an Interbase alias, both the path to
the database file and the file name itself are entered in the Server Name
parameter, which is one of the many additional parameters required for an
alias that uses a SQL Server driver. Others include User Name, Open Mode,
and LangDriver, and many of these parameters are given default values by
the BDE Configuration Utility.

Installing BDE with InstallShield Express

InstallShield Express not only provides automatic support for installing
the Borland Database Engine and all required drivers, it also allows you to
setup the aliases which will be used by your BDE application on the target
machine. These aliases will then be added by Express to the configuration
file used by the target system's BDE Configuration Utility.

To create a BDE setup with Express, open the Select InstallShield Objects -
General Options dialog which is specific to the Project Type you choose
when you opened a new project (e.g., Select InstallShield Objects for
Delphi). Select the BDE check box in the InstallShield Objects window, and
Express will automatically launch the BDE Installation Type dialog. (If
creating a 16-bit setup, Express will launch the BDE Alias Step 1 of 4
dialog at this point.)

BDE Installation Type (32-bit setup only)

Use the BDE Installation Type dialog box to specify whether you want to
install all or part of BDE in your setup. If you select the Full BDE
Installation radio button, all of the available standard BDE drivers and
query engines on your system are added to your setup. (Therefore, the
check boxes in the BDE Driver Types and Query Engine Types windows remain
inactive.) It is strongly recommended that you include a full BDE
installation with any deployed BDE application. However, it is possible,
in some cases, to install a partial set of BDE files.

If you select the Partial BDE Installation radio button, the check boxes in
the BDE Driver Types and Query Engine Types windows
are then activated. You may then select to install any of the three
standard BDE database drivers (dBase, Paradox and ASCII Text), the ODBC
driver socket, and the two query engine types (the SQL Engine and the Query
By Example Engine). However, a partial BDE installation must include the
complete core subset of files required to support BDE. You may then add or
omit the query and database driver subsets as you prefer. (Note: For a
complete listing of the BDE core subset of files, as well as the database
driver and query engine subsets, please refer to the Partial BDE
Installation topic available in the Express On-Line Help.)

In a partial BDE installation, all of the BDE files (except for the .bll
language files and the configuration file) will, by default, be installed
in your application's main installation directory, <INSTALLDIR>, rather
than the ...\Program Files\Borland\Common Files\BDE location in which
they're placed during a full 32-bit BDE installation. When a user runs an
application that included only a partial BDE installation, he cannot
concurrently run another BDE-dependent application. This is the primary
limitation incurred by using a partial install of BDE.

Continue to the next step by clicking the Next push button.

Creating a BDE Alias

In the BDE Alias Step 1 of 4 dialog box, click the New push button to
launch the BDE Alias Name dialog, and then enter the desired alias in the
Alias Name field. If creating the aliases that were used in the dBase and
Interbase examples given earlier, you would enter MydBaseAlias in this
field. Click OK to enter the alias, and it will then be listed in the BDE
Aliases window. Then repeat this processing, entering the Interbase alias
as MyInterbaseAlias. This alias will then also be listed in the BDE Aliases
window. Click Next to continue on to Step 2.

Selecting the check box in the BDE Alias Step 2 of 4 dialog allows your
alias' configuration information to be saved in a composite 16-/32-bit
format to provide backward compatibility with BDE applications for Windows
3.1. Click Next to go to step 3,


Willem Luijk <WLuijk@Luijk.NL> wrote in article <33943669.5ECA@Luijk.NL>...
> Hello everybody,
>
> We want to make a setup for our application but we have the following
> problem.
> The Interbase-database is enclosed in the install-set and is placed in a
> subdirectory of the InstallDir.
>
> To let the application work with the database we have to make a new
> Alias in the BDE. But how can we make that alias point to the
> database??????
>
> After installing the database of the new alias is set to :
> IB_SERVER:/PATH/DATABASE.GDB
>
> Who can help us?
>