Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere サーバ プログラミング » JDBC サポート » サーバ側 JDBC クラスから接続を確立する方法

 

サーバ側接続サンプルの動作の違い

サーバ側の接続サンプルは、次のことを除いてクライアント側の接続サンプルとほぼ同じです。

  1. JDBC ドライバをプリロードする必要はありません。

  2. 現在の接続を使用して、稼働中のデフォルトデータベースに接続します。getConnection 呼び出しで指定した URL は次のように変更されています。

    Connection con = DriverManager.getConnection(
        "jdbc:default:connection" );
  3. System.exit() 文は削除されています。