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 事件 » 同步事件

 

begin_connection 连接事件

在 MobiLink 服务器连接到统一数据库服务器时调用。

参数

无。

缺省操作

无。

注释

MobiLink 同步过程在收到同步请求时打开连接。当应用程序创建或重新创建与 MobiLink 服务器的连接时,MobiLink 服务器将会临时分配一个与数据库服务器的连接,该连接在整个同步过程中持续。如果 MobiLink 服务器正在使用池中的一个连接,则可能不会调用此事件。

注意

Java 或 .NET 中通常不使用此脚本,这是因为您将在此类实例中使用成员变量而不是数据库变量,并在构造函数中准备成员。

另请参见
SQL 示例

以下的 SQL 脚本在 SQL Anywhere 统一数据库中运行。该脚本创建了两个变量,一个代表 last_download 时间戳,另一个代表雇员 ID。

CALL ml_add_connection_script(
    'custdb',
    'begin_connection',
    'create variable @LastDownload timestamp;
    create variable @EmployeeID integer;')