Openoffice.org with SQL Databases: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
Line 19: Line 19:


* Connect to existing database (select driver): postgresql
* Connect to existing database (select driver): postgresql
* Connection settings (example, find out with psql -l):
* Connection settings: We have to define the server ("host") name and the name of the database, probably also the user name in case you have to connect with a different user name. To find out, '''ask your DB administrator''' or use in a terminal "psql -l " or, if the database is on a remote server, "psql -h host.mydomain.org -l". An entry may look like this:
        ''Example:''
         dbname=pgtest host=my.databaseserver.org
         dbname=pqtest host=mydatabaseserver
* User name (the login name): yourname
* User name: yourname
* Finish brings you to a 'Save as' dialog for the connection, saves these settings as file
* Finish brings you to a 'Save as' dialog for the connection, saves these settings as file
* Then click on 'Tables' in the next screen to see the existing PG tables in the database. Usually the 'public' scheme contains the user tables.
* Then click on 'Tables' in the next screen to see the existing PG tables in the database. Usually the 'public' scheme contains the user tables.

Revision as of 14:51, 28 August 2006

Usage with various drivers

  • See Database drivers page for overview. There are drivers for PostgreSQL, SQLite and MS-Access mdb files.

PostgreSQL (OpenOffice.org 2.x)

Installation of PostgreSQL driver

  1. download postgresql-sdbc-X.Y.Z.zip driver (take the "recommended" file) and save the file to your disk.
  2. Start OpenOffice, choose 'Tools/Package Manager'. Click on the add button and select the downladed file (DO NOT EXTRACT IT !) in the upcoming File dialog. The driver gets installed now, afterwards, the file is listed in the dialog with state enabled. In case you have installed an older version of the driver, remove it now. Close the dialog.
  3. Restart openoffice (even the quickstarter on windows must be shut down !!!).
  4. Done (did you really close openoffice? Please do.)

Usage of PostgreSQL driver

After starting OpenOffice.org again, use: File -> New -> Database to enter the DB dialog.

  • Connect to existing database (select driver): postgresql
  • Connection settings: We have to define the server ("host") name and the name of the database, probably also the user name in case you have to connect with a different user name. To find out, ask your DB administrator or use in a terminal "psql -l " or, if the database is on a remote server, "psql -h host.mydomain.org -l". An entry may look like this:
       dbname=pgtest host=my.databaseserver.org
  • User name (the login name): yourname
  • Finish brings you to a 'Save as' dialog for the connection, saves these settings as file
  • Then click on 'Tables' in the next screen to see the existing PG tables in the database. Usually the 'public' scheme contains the user tables.
  • The 'Queries' button takes you to the query mode, it contains a graphical query designer.

MySQL (OpenOffice.org 2.x)


DBF files (OpenOffice.org 2.x)

No installation needed, the driver is included in the standard version of OpenOffice.org.


MS-Access mdb files (OpenOffice.org 2.x)

Note that the driver is somewhat behind the mdbtools.sf.net development.


SQLite files (OpenOffice.org 2.x)