Entering content frame

This graphic is explained in the accompanying text Example: Connecting OpenOffice to MaxDB Using ODBC (Windows) Locate the document in its SAP Library structure

Use

The following description shows how you can connect OpenOffice as a database application using ODBC to MaxDB database instance HOTELDB. The example was tested on Windows 2000 using OpenOffice version 1.1.2.

Prerequisites

·        You have installed OpenOffice Version 1.1.2 (http://www.openoffice.org).

·        You have installed the MaxDB software including the ODBC driver (see Installation Manual, Installation Profile) and configured it (see ODBC, Installing the ODBC Driver).

·        You have created database instance HOTELDB and the database user MONA and filled the tables with data (see SQL Tutorial, Setting Up Database HOTELDB).

·        The HOTELDB database instance is in operational state ONLINE.

·        The X Server is started.

Procedure

...

       1.      To call the ODBC data source administrator, choose Start ® Settings ® Control Panel ® Administrative Tools ® Data Sources (ODBC)

       2.      To create a new data source for HOTELDB, go to the User DSN tab and choose Add...

       3.      Choose the MaxDB ODBC driver MaxDB and then make the following entries:

ODBC configuration of data sources

Property

Value

Data Source Name

Specify a name such as maxdb_hoteldb

Description

Description, such as My hotel database

Server

Computer on which the database instance is located. You can leave this field empty if the database instance is located on the local computer.

Database

HOTELDB

To make optional entries, choose Settings.

       4.      Confirm all entries and close the ODBC data source administrator.

       5.      To start OpenOffice, choose Start ® Programs ® OpenOffice.org 1.1.2 ® Spreadsheet

       6.      Choose View ® Data Sources

The data sources that were already defined are displayed.

       7.      To make the HOTELDB database instance available as a data source in OpenOffice, choose Tools ® Data Sources and then New Data Source. Make the following entries:

OpenOffice configuration of data sources

Tab

Property

Value

General

Name

Specify a name such as Hotel database

 

Database Type

ODBC

 

Data Source URL

Specify a data source, such as maxdb_hoteldb

ODBC

User Name

MONA

 

Password Required

Select this option.

       8.      On the same dialog, choose the Tables tab. The system asks you to enter the password for database user MONA. Enter the password RED.

Caution

Always specify the user name and password in uppercase.

All tables belonging to database user MONA are displayed.

Note

If problems occur when you log on to the database instance, or if the tables are not displayed correctly, then you can switch on the ODBC trace for troubleshooting; see Traces. Note that writing a trace seriously affects the performance of the database system.

Result

You can now use database instance HOTELDB as an OpenOffice data source. OpenOffice provides the following options, among others:

·        Saving SQL queries

·        Graphically designing SQL queries

·        Creating input forms for inserting and changing values in the database instance. To start the form autopilot, choose File ® AutoPilot ® Form

Example

Input form for table RESERVATION

This graphic is explained in the accompanying text

See also:

ODBC Manual

 

Leaving content frame