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 客户端简介 » SQL 直通 » SQL 直通简介 » 执行脚本


在 UltraLite 客户端上自动执行脚本

在 UltraLite 客户端上,除非已经设置了连接参数 dont_run_scripts,否则下次启动数据库时会自动运行未标记为 manual 的脚本。


typedef void(UL_CALLBACK_FN *ul_sql_passthrough_observer_fn)
    ( ul_sql_passthrough_status * status );

ul_sql_passthrough_status 结构定义如下:

typedef struct {
    ul_sql_passthrough_state    state; // current state
    ul_u_long  script_count; // total number of scripts to execute
    ul_u_long  cur_script; // current script being executed (1-based)
    ul_bool  stop;  // set to true to stop script execution
         // can only be set in the starting state
    ul_void *  user_data; // user data provided in register call
    SQLCA *  sqlca;
} ul_sql_passthrough_status;


UL_FN_SPEC ul_ret_void UL_FN_MOD ULRegisterSQLPassthroughCallback(
SQLCA *                             sqlca,
ul_sql_passthrough_observer_fn      callback,
ul_void *                           user_data );