This file contains some notes on running OpenOffice.org with the
ODBC-ODBC Bridge. Easysoft tested OOB 1.1.0.0 with OpenOffice.org
1.0.1 - 1.0.3 on RedHat 8.0 (which includes unixODBC 2.2.2).

The ODBC-ODBC Bridge can be used with OpenOffice to access remote ODBC
data sources e.g. to access MS SQL Server from OpenOffice running on
Solaris, Linux etc.

OpenOffice.org can use ODBC data sources in its various applications
to link to external data. OpenOffice.org appears to attempt to load
libodbc.<shared_extension> to use as the ODBC driver manager.

To use OOB under OpenOffice.org you should ensure the unixODBC driver
manager is installed and make sure OOB is installed as an ODBC driver
under unixODBC. If unixODBC is not installed already, install the
version that comes with OOB distributions. OpenOffice.org is built
with threads so make sure you get the OOB thread-safe ("-mt")
distribution and if you build unixODBC yourself then use
--enable-threads=yes on the configure line.

Before trying to use ODBC in OpenOffice.org create an ODBC data source
and test it with unixODBC's isql utility.

If you have the GUI unixODBC programs (you need QT for these) then you
can use ODBCConfig to create OOB data sources once OOB is installed as
an ODBC driver under unixODBC. Otherwise you will have to hand edit
the unixODBC odbc.ini file to add OOB data sources (see DSNDefinition
and example_odbc.ini in the OOB docs directory).

Once your data source is created and tested with isql you should be
able to find it in OpenOffice.org. Most OpenOffice.org applications have
a Tools -> Data Sources menu item where you will be presented with
a dialogue containing General, ODBC, Tables. Queries and Links tabs.

[1] Click on "New Data Source" and type in a name to use for this data
    source inside OpenOffice.org.

[2] In the "Database type" drop down select ODBC.

[3] The "Data source URL" field should now show "sdbc:odbc:". Click
    on the ellipses after this field which should show you the
    ODBC data sources unixODBC knows about. Select one.

    If your data source is not in this list check the odbc.ini file.

[4] Now click on the ODBC tab. If your data base requires a database
    username enter it into the "User name" field. If this user needs to
    enter a password click on the "Password required" checkbox.

[5] You should now be able to click on the Tables tab and see a heirachy
    of tables.

[6] Click on Queries to create a query.

    At this time (OpenOffice.org 1.0.1) queries created in design view
    or executed in any mode other than "Run SQL command directly" will
    not work to databases that use multipart names
    (catalog.schema.table) see instance 10577 at
    http://www.openoffice.org/issues/show_bug.cgi?id=10577.

    Until 10577 is fixed you must switch the design view off and click
    on the "Run SQL command directly" to get any data back from
    databases using multipart names. In this case the data will be
    read-only.

RedHat 8.0 specific notes
=========================

RedHat 8.0 comes with unixODBC 2.2.2 which is installed with a
--prefix of /usr. As a result odbcinst is in /usr/bin/odbcinst and
libodbc.so is in /usr/lib. OOB distributions before 1.1.0.4 do not
expect to find unixODBC in these places and will ask if you have
unixODBC installed and where it is.

The unixODBC that comes with RedHat appears to have been built with
--sysconfdir=/etc so the odbc.ini and odbcinst.ini files should be in
/etc.

When you install OOB (pre 1.1.0.4) on RedHat 8 it may fail to locate
the existing unixODBC in which case you have two alternatives:

[1] accept the fact the OOB installation does not find the existing
    unixODBC and answer Yes to install the unixODBC that comes with
    OOB. All the OOB installation needs is odbcinst and libodbcinst.so
    to install the OOB driver into unixODBC. Once OOB is installed
    under unixODBC you can delete /usr/local/easysoft/unixODBC.

[2] when asked if you already have unixODBC installed, say Yes and
    enter /usr as the path to unixODBC. This will use your existing
    odbcinst to install OOB (no net difference to [1]). When asked if
    you want to install OOB as an ODBC driver under unixODBC answer
    Yes.
