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

SQL Anywhere 11.0.1 (中文) » MobiLink - 服务器管理 » MobiLink 服务器 API » 使用 Java 语言编写同步脚本 » 用于 Java 的 MobiLink 服务器 API 参考 » DBConnectionContext 接口

 

getVersion 方法

语法
public java.lang.String getVersion( )
注释

返回脚本版本字符串。

返回值

脚本版本字符串。

另请参见
示例

以下示例显示如何获取脚本版本并使用它作决定。

注意

此示例假定您拥有一个名为 _cc 的 DBConnectionContext 实例。

// A method that uses the script version
public void handleEvent() {
    // ...

    String version = _cc.getVersion();
    if (version.equals("My Version 1")) {
        // ...
    } else if (version.equals("My Version 2")) {
        // ...
    }
}

// ...