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

SQL Anywhere 12.0.1 » SQL Anywhere サーバー プログラミング » JDBC サポート » JDBC クライアントアプリケーションからの接続 » サーバー側 JDBC クラスからの接続の確立

 

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

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

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

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

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