On Mon, 14 Oct 2002, Guy Steven wrote:

> Has anyone managed to get open office to recognise postgresql as an odbc
> data source on redhat 8?

It is refreshing that from time to time I see a non-trivial question
posted on this list :-D OK here it is (quite schetchy but I am really busy):


How to connect OpenOffice to Postgresql
---------------------------------------

ODBC:
-----

1. install the unixODBC packages and configure the odbc.ini, etc
   (e.g. use ODBCConfig)

2. Prepare your database for odbc
   # this for future DB's
   psql -d template1 -f /usr/share/pgsql/odbc.sql
   # this for all DB's already present
   psql -d <DB> -f /usr/share/pgsql/odbc.sql

3. Start OO
   Menu:Tools -> Data Sources:  choose [New Data Source]

   Tab [General]
   Name: <oo name ...>
   Connection:
   Database type: ODBC
   Data Source-URL: sdbc:odbc:<odbc name>

4. fill other fields as required

JDBC
----

This is from memory as RedHat has f**ked the Java support in OO:

1. install the Java SDK/JRE (assuming Java 2)

2. RedHat 8.0 OpenOffice does NOT have Java support!
   Install OO with Java support, if you have it already installed without
   then grab an <~/oo-path>/user/config/javarc from somebody else and edit
   as required.

3. edit <oo_home>/user/config/javarc: add to SystemClasspath
   the full path of pgjdbc2.jar

4. Start OO
   Menu:Tools -> Data Sources:  choose [New Data Source]

   Tab [General]
   Name: <oo name ...>
   Connection:
   Database type: JDBC
   Data Source-URL: jdbc:postgres://127.0.0.1/<PgSQL DB name>

5. driverclass is: org.postgresql.Driver 

6. fill other fields as required

Cheers,
-- 
Ryurick M. Hristev mailto:[EMAIL PROTECTED]
Computer Systems Manager
University of Canterbury, Physics & Astronomy Dept., New Zealand

Reply via email to