602SQL Documentation Index  

SDBC Interface

The SDBC (Star Database Connectivity) driver allows you to utilize 602SQL Server data in the OpenOffice.org office suite for Windows and Linux. The drives resides in the 602sql-sdbc-x.x.x.zip package, where "x.x.x" is the driver version. The package is common to both Windows and Linux.

Basic Information

The SDBC driver for 602SQL 11.x (and newer) is designed for OpenOffice.Org version 2.x (it will not function on OpenOffice.org 1.x).

Interactive Install/Uninstall

It is assumed that you have 602SQL and OpenOffice.org installed. When you install 602Office (OpenOffice.org + 602SQL) on Windows, the driver will be installed automatically. Manual installation can be done in these three steps:

  1. Run a OpenOffice.org program (e.g. Writer) and select the menu command Tools > Package manager
  2. Press the Add... button in the displayed dialog and locate the SDBC driver (e.g. the 602sql-sdbc-x.x.x.zip file)
  3. The driver will be added to OpenOffice.org. You must restart OpenOffice.org (including the OpenOffice.org quickstarter in Windows) before using the driver.

To uninstall the driver, press the Remove button in the Package manager dialog.

Install the Driver from the Command Line

The SDBC driver can also be installed into OpenOffice.org from the command line. The unopkg program is used for this (unopkg.exe on Windows). You can find this utility in the program subfolder of the OpenOffice.org installation directory (e.g. C:\Program Files\OpenOffice.org 2.0\program\unopkg.exe in Windows, /usr/lib/ooo-2.0/program/unopkg in SUSE 10). The command syntax is as follows:

unopkg add [--shared] driver

parameter --shared - optional parameter, this will cause the driver to register for all users (otherwise only for the user that runs the command)

parameter driver - specifies the name and path to the SDBC driver

Usage example in Windows:

unopkg add --shared e:\SDBC\602sql-sdbc-2.0.0.zip

Uninstall the Driver from the Command Line

The command syntax is as follows:

unopkg remove [--shared] driver

parameter --shared - specifies whether the driver was installed for all users and therefore should be removed from all users

parameter driver - sets the SDBC driver name

Usage example:

unopkg add --shared 602sql-sdbc-2.0.0.zip

Connecting OpenOffice.org to a 602SQL Server

If you have the SDBC driver installed, you will still need to connect OpenOffice.org to a 602SQL Server and application (the connection is established automatically when installing 602Office in Windows). This is done by creating a new database in OpenOffice.org, click File > New > Database. The database wizard will appear:

  1. Select connect to an existing database and select 602SQL from the list (if 602SQL is not in the list, the SDBC driver was not installed correctly).
  2. Set the URL of the data source in the second step in the form of Database_name/Application_name, where Database_name is the 602SQL database name that is registered in 602SQL, and Application_name is the name of the schema that should be used (this may contain blank spaces and national characters). The Application_name is an optional entry (if it is not specified, all tables from the database will be used, except for system tables). If the Application_name is not specified, the slash cannot be used after the Database_name. If the Database_name contains a slash (/), the name must be enclosed in grave accent characters (`Database/Name`).
  3. The third step serves for entering the user name for database access (do not specify a user name for anonymous access).
  4. Select the Yes, register database option and click Finish. You must create a new file for the connection (you will be prompted to do so by the wizard). Now you can press the F4 key (or from the menu View > Data sources) to display the data sources window.

WARNING: OpenOffice.org can only edit data in a 602SQL table that has a primary key!

WARNING: Fixed queries created and stored in an application are displayed in the Data Source window along with tables. Queries are definitions stored in OpenOffice.org using the Data Sources terminology and are NOT stored in the 602SQL database.

Log Activity of the SDBC Driver

You may log activity to a text file that can be used to troubleshoot errors. Do the following in Windows to enable logging:

Do the following in Linux to enable logging:

Log parameters for both operating systems: