- - * - WhiteUnicorn - * - -




* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >


3217:Adding ODBC Drivers in Delphi 3.0

KEYWORDS: odbc, drivers, adding, configuring, virtual, bde administrator AREA:

Adding ODBC Drivers in Delphi 3.0

The minimum requirements necessary to install an ODBC driver in
Delphi 3.0 are as follows:
	
	Microsoft ODBC Manger
	Windows 95 or NT
	Delphi Developer or Delphi Client/Server edition
	Vendor-provided ODBC driver (already installed on your system)

	When using Delphi 3.0 there are now two common methods
to add ODBC drivers to the BDE.  The first step to using any of the
methods is to first obtain and install the vendor-supplied ODBC driver
onto your system. Once this first essential step is completed the next
steps are fairly simple.
	   In the left panel on the screen
is a list of drivers and data sources that have been previously
configured for use with BDE applications.

Method A:

1. First start the BDE Administrator from the Windows Start Menu
(it will be in the Delphi 3.0 folder.)

2. Now select Object|ODBC administrator from the main menu.
(this will bring up a list of currently installed drivers.)

3. Choose Add and then select the ODBC driver you would like to create
a data source for, then click on OK.

4. Next fill in the appropriate information for your driver.
(A minimal configuration will require the  Data Source Name field.
You will also need to fill in at least one other field that is a
location specifier for the data. This could be a path in the case of
Paradox or dBase tables or the Server field in the case of configuring
an Interbase ODBC driver.  Some non-exhaustive examples include; if
you are using Interbase you would select a path to a .GDB file, if
using Paradox or dBASE files you would specify the data directory
containing your tables or if you were using Oracle you would specify
the entry as it appears in your TNSNAMES.ORA file.  Once this is done
you have created a virtual driver and will be able to access your
database files through the datasource your created.)

Method B:

1. First start the BDE Administrator from the Windows Start Menu
(it will be in the Delphi 3.0 folder.)
2. Click on the database tab, then right click inside of the left panel.
3. Select New from the popup menu and then select the type of ODBC driver
you would like to add and click OK.
4. Again right click in the database panel and select Apply from the
popup menu.
5. Now you must select a valid ODBC DSN (Data Source Name) from the
definition panel on the right and select apply.

Both of these methods result in the ability to hook a TDataset in Delphi
to live data.

	You may have noticed some new options from the Object|Options
menu, these options allow you to select different configuration modes
to view.  It’s advisable to have all check boxes in the Select
Configuration Modes to View panel selected.  When all the check boxes
are selected you will be provided with an extensive list of all drivers
and aliases available for your use.  Without checking the ‘virtual’
setting you will not be able to ‘see’ the drivers that you have added
through the MS ODBC manager but not explicitly through the BDE (as per
method 2).



        TI



* #WhiteUnicorn/ StartPage/ Documentation/DelphiFAQ >



- - * - Anastasija aka WhiteUnicorn - * - - LJLiveJournal
PFPhotoFile