Accessing ODBC Databases from StarOffice 8
This article describes how to use StarOffice with any Easysoft ODBC driver. You can then access databases such as Microsoft SQL Server, Microsoft Access, Oracle®, DB2, InterBase and Sybase ASE from StarOffice. For example, access SQL Server using its Windows ODBC driver from Base or Calc running on Linux or Solaris. Do this by using StarOffice with the Easysoft ODBC-ODBC Bridge (OOB)
To use an Easysoft ODBC driver with StarOffice, ensure that the unixODBC Driver Manager is installed and that the Easysoft ODBC driver is installed as an ODBC driver under unixODBC. If unixODBC is not installed already, install the version that comes with the Easysoft ODBC driver
distribution. StarOffice is built with threads, so if you build unixODBC yourself, use
--enable-threads=yes on the configure line. If you are using the OOB, make sure that you specify the thread-safe OOB client driver ("OOB_r") when creating data sources for use with StarOffice. For earlier OOB releases, the thread-safe client is contained in distributions that contain "-mt" in their file name.
If you have the GUI unixODBC programs (you need QT for these), you can use ODBCConfig to create Easysoft ODBC driver data sources. Otherwise, you will have to edit the unixODBC odbc.ini file to add data sources. For information about adding an OOB data source, see DSN_definition.txt and example_odbc.ini in the install_dir/easysoft/oob/doc directory or the OOB documentation. For information about adding a data source for a different Easysoft ODBC driver, see the documentation for your Easysoft ODBC driver.
After you have created your data source and tested it with isql, you can use it from StarOffice applications such as Base, Calc and Writer.
- Choose File > New > Database.
- Click Connect to an existing database.
- Click ODBC in the list, and then click Next.
- Click Browse, double-click your data source, and then click Next.
If your data source is not listed, check the odbc.ini file.
- If your database requires a database user name, type it in the User name box. If this user needs to supply a password click the Password required check box.
- Click Finish.
- Save the database when prompted.
The database opens in a new Base window. From here you can access your data.
- In the left pane of the database window, click the Tables icon to see a hierarchy of tables. Type the database password if prompted, and then click OK.
- To retrieve the data in a table, in the Tables pane, double-click a table.
- Click the Queries icon to create a query.
Use any of the methods listed in the Tasks pane to create a query.
RedHat 8.0 comes with unixODBC 2.2.2 which is installed with a
/usr. As a result, odbcinst is in /usr/bin/odbcinst and libodbc.so is in /usr/lib. OOB distributions before 22.214.171.124 do not expect to find unixODBC in these places and will ask if you have unixODBC installed and where it is.
- 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.
- 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.