JDBC 接続
JDBC データベースにアクセスするためのオプションを指定します。
JDBC のサンプル
JDBC ドライバークラスを使用して、LibreOffice から JDBC データベースに接続できます。ドライバークラスは、データベースの製造元から提供されます。JDBC データベースの例として、Oracle および MySQL があります。
The driver classes must be added to LibreOffice in LibreOffice - PreferencesTools - Options - LibreOffice - Advanced.
Oracle データベース
JDBC ドライバーを使用すると、Solaris または Linux から Oracle データベースにアクセスできます。Windows から Oracle データベースにアクセスするには、ODBC ドライバーが必要です。
On UNIX, ensure that the Oracle database client is installed with JDBC support. The JDBC driver class for the Solaris Oracle client version 8.x is located in the <Oracle client>/product/jdbc/lib/classes111.zip directory. You can also download the latest version from the Oracle web site.
データソースの URL ボックスで、Oracle データベースサーバーの場所を入力します。URL の構文は、データベースの種類に依存します。詳細については、JDBC ドライバーに付属するドキュメントを参照してください。
Oracle データベースの場合、URL の構文は次のようになります。
oracle:thin:@hostname:port:database_name
-
hostname は、Oracle データベースを実行するマシンの名前です。hostname は、サーバーの IP アドレスで置き換えることもできます。
-
port は、Oracle データベースが待機するポートです。正しいポートアドレスについては、データベース管理者に尋ねてください。
-
database_name は Oracle データベースの名前です。正しい名前をデータベース管理者に尋ねてください。
MySQL データベース
MySQL データベース用のドライバーは、MySQL Web サイトで入手できます。
MySQL データベースの構文は次のとおりです。
mysql://hostname:port/database_name
-
hostname は、MySQL データベースを実行するマシンの名前です。hostname は、サーバーの IP アドレスで置き換えることもできます。
-
port は、MySQL データベースのデフォルトポートです。通常、3306 です。
-
database_name はデータベースの名前です。
データソース URL
Enter the URL for the database. For example, for the MySQL JDBC driver, enter "jdbc:mysql://<Servername>/<name of the database>". For more information on the JDBC driver, consult the documentation that came with the driver.
JDBC ドライバークラス
Enter the name of the JDBC driver.
Before you can use a JDBC driver, you need to add its class path. Choose LibreOffice - PreferencesTools - Options - LibreOffice- Advanced, and click the Class Path button. After you add the path information, restart LibreOffice.
テストクラス
現在の設定で接続をテストします。