在 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 ); |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |