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() 语句已删除。