保存 dbmlsync 实用程序使用 DBTools 库时所需的信息。
typedef struct a_sync_db { unsigned short version; char * connectparms; char * publication; const char * offline_dir; char * extended_options; char * script_full_path; const char * include_scan_range; const char * raw_file; MSG_CALLBACK confirmrtn; MSG_CALLBACK errorrtn; MSG_CALLBACK msgrtn; MSG_CALLBACK logrtn; a_sql_uint32 debug_dump_size; a_sql_uint32 dl_insert_width; a_bit_field verbose : 1; a_bit_field debug : 1; a_bit_field debug_dump_hex : 1; a_bit_field debug_dump_char : 1; a_bit_field debug_page_offsets : 1; a_bit_field use_hex_offsets : 1; a_bit_field use_relative_offsets : 1; a_bit_field output_to_file : 1; a_bit_field output_to_mobile_link : 1; a_bit_field dl_use_put : 1; a_bit_field kill_other_connections : 1; a_bit_field retry_remote_behind : 1; a_bit_field ignore_debug_interrupt : 1; SET_WINDOW_TITLE_CALLBACK set_window_title_rtn; char * default_window_title; MSG_QUEUE_CALLBACK msgqueuertn; MSG_CALLBACK progress_msg_rtn; SET_PROGRESS_CALLBACK progress_index_rtn; char ** argv; char ** ce_argv; a_bit_field connectparms_allocated : 1; a_bit_field entered_dialog : 1; a_bit_field used_dialog_allocation : 1; a_bit_field ignore_scheduling : 1; a_bit_field ignore_hook_errors : 1; a_bit_field changing_pwd : 1; a_bit_field prompt_again : 1; a_bit_field retry_remote_ahead : 1; a_bit_field rename_log : 1; a_bit_field hide_conn_str : 1; a_bit_field hide_ml_pwd : 1; a_sql_uint32 dlg_launch_focus; char * mlpassword; char * new_mlpassword; char * verify_mlpassword; a_sql_uint32 pub_name_cnt; char ** pub_name_list; USAGE_CALLBACK usage_rtn; a_sql_uint32 log_size; a_sql_uint32 hovering_frequency; a_bit_short ignore_hovering : 1; a_bit_short verbose_upload : 1; a_bit_short verbose_upload_data : 1; a_bit_short verbose_download : 1; a_bit_short verbose_download_data : 1; a_bit_short autoclose : 1; a_bit_short ping : 1; a_bit_short _unused : 9; char * encryption_key; a_syncpub * upload_defs; const char * log_file_name; char * user_name; a_bit_short verbose_minimum : 1; a_bit_short verbose_hook : 1; a_bit_short verbose_row_data : 1; a_bit_short verbose_row_cnts : 1; a_bit_short verbose_option_info : 1; a_bit_short strictly_ignore_trigger_ops : 1; a_bit_short _unused2 : 10; a_sql_uint32 est_upld_row_cnt; STATUS_CALLBACK status_rtn; MSG_CALLBACK warningrtn; char ** ce_reproc_argv; a_bit_short upload_only : 1; a_bit_short download_only : 1; a_bit_short allow_schema_change : 1; a_bit_short dnld_gen_num : 1; a_bit_short _unused3 :12; const char * apply_dnld_file; const char * create_dnld_file; char * sync_params; const char * dnld_file_extra; COMServer * com_server; a_bit_short trans_upload : 1; a_bit_short continue_download : 1; a_bit_short lite_blob_handling : 1; a_sql_uint32 dnld_read_size; a_sql_uint32 dnld_fail_len; a_sql_uint32 upld_fail_len; a_bit_short persist_connection :1; a_bit_short verbose_protocol :1; a_bit_short no_stream_compress :1; a_bit_short _unused4 :13; const char * encrypted_stream_opts; a_sql_uint32 no_offline_logscan; a_bit_short server_mode :1; a_bit_short allow_outside_connect :1; a_bit_short prompt_for_encrypt_key:1; a_bit_short com_server_mode:1; a_bit_short verbose_server:1; a_bit_short _unused5 :11; a_sql_uint32 server_port; char * preload_dlls; char * sync_profile; char * sync_opt; a_syncpub * last_upload_def; } a_sync_db; |
成员 | 说明 | ||||||
---|---|---|---|---|---|---|---|
version | DBTools 版本号。 | ||||||
connectparms |
连接到数据库所需的参数。它们采用如下所示的连接字符串形式:
数据库服务器将由连接字符串的 START 参数启动。例如:
一个包括 START 参数的完整连接字符串示例:
有关连接参数的列表,请参见连接参数。 |
||||||
publication | 不建议使用;使用 NULL。 | ||||||
offline_dir | 日志目录,在选项后面的命令行上指定。 | ||||||
extended_options | 扩展选项,由 -e 指定。 | ||||||
script_full_path | 不建议使用;使用 NULL。 | ||||||
include_scan_range | 保留;使用 NULL。 | ||||||
raw_file | 保留;使用 NULL。 | ||||||
confirmrtn | 保留;使用 NULL。 | ||||||
errorrtn | 显示错误消息的函数。 | ||||||
msgrtn | 将消息写入用户接口(或日志文件)的函数。 | ||||||
logrtn | 将消息仅写入日志文件的函数。 | ||||||
debug_dump_size | 保留;使用 0。 | ||||||
dl_insert_width | 保留;使用 0。 | ||||||
verbose | 不建议使用;使用 0。 | ||||||
debug | 保留;使用 0。 | ||||||
debug_dump_hex | 保留;使用 0。 | ||||||
debug_dump_char | 保留;使用 0。 | ||||||
debug_page_offsets | 保留;使用 0。 | ||||||
use_hex_offsets | 保留;使用 0。 | ||||||
use_relative_offsets | 保留;使用 0。 | ||||||
output_to_file | 保留;使用 0。 | ||||||
output_to_mobile_link | 保留;使用 1。 | ||||||
dl_use_put | 保留;使用 0。 | ||||||
kill_other_connections | 如果指定了 -d 选项,则为 TRUE。 | ||||||
retry_remote_behind | 如果指定了 -r 或 -rb,则为 TRUE。 | ||||||
ignore_debug_interrupt | 保留;使用 0。 | ||||||
set_window_title_rtn | 通过对其调用可更改 dbmlsync 窗口标题的函数(仅限 Windows)。 | ||||||
default_window_title | 将要在窗口标题中显示的程序的名称(如 DBMLSync)。 | ||||||
msgqueuertn |
当 DBMLSync 要休眠时调用的函数。该参数指定休眠周期(以毫秒为单位)。正如 dllapi.h 中的定义,此函数应返回以下值。
|
||||||
progress_msg_rtn | 用于改变状态窗口中进度条上的文本的函数。 | ||||||
progress_index_rtn | 用于更新进度条状态的函数。 | ||||||
argv | 用于此次运行的 argv 数组;此数组的最后一个元素必须为 NULL。 | ||||||
ce_argv | 保留;使用 NULL。 | ||||||
connectparms_allocated | 保留;使用 0。 | ||||||
entered_dialog | 保留;使用 0。 | ||||||
used_dialog_allocation | 保留;使用 0。 | ||||||
ignore_scheduling | 如果指定了 -is,则为 TRUE。 | ||||||
ignore_hook_errors | 如果指定了 -eh,则为 TRUE。 | ||||||
changing_pwd | 如果指定了 -mn,则为 TRUE。 | ||||||
prompt_again | 保留—使用 0。 | ||||||
retry_remote_ahead | 如果指定了 -ra,则为 TRUE。 | ||||||
rename_log | 如果指定了 -x,则为 TRUE,此时会重命名并重新启动日志文件。 | ||||||
hide_conn_str | 除非指定 -vc,否则为 TRUE。 | ||||||
hide_ml_pwd | 除非指定 -vp,否则为 TRUE。 | ||||||
dlg_launch_focus | 保留;使用 0。 | ||||||
mlpassword | 用 -mp 指定的 MobiLink 口令,否则为 NULL。 | ||||||
new_mlpassword | 用 -mn 指定的新的 MobiLink 口令,否则为 NULL。 | ||||||
verify_mlpassword | 保留;使用 NULL。 | ||||||
pub_name_cnt | 不建议使用;使用 0。 | ||||||
pub_name_list | 不建议使用;使用 NULL。 | ||||||
usage_rtn | 保留;使用 NULL。 | ||||||
log_size | 日志大小(以字节为单位),用 -x 指定;否则为 0。 | ||||||
hovering_frequency | 用 -pp 设置的悬停频率(以秒为单位)。 | ||||||
ignore_hovering | 如果指定了 -p,则为 True。 | ||||||
verbose_upload | 如果指定了 -vu,则为 True。 | ||||||
verbose_upload_data | 保留;使用 0。 | ||||||
verbose_download | 保留;使用 0。 | ||||||
verbose_download_data | 保留;使用 0。 | ||||||
autoclose | 如果指定了 -k,则为 TRUE。 | ||||||
ping | 如果指定了 -pi,则为 TRUE。 | ||||||
encryption_key | 用 -ek 指定的数据库键。 | ||||||
upload_defs | 将要一起上载的发布的链接列表—请参见 a_syncpub。 | ||||||
log_file_name | 用 -o 或 -ot 指定的数据库服务器消息日志文件名。 | ||||||
user_name | 用 -u 指定的 MobiLink 用户名。 | ||||||
verbose_minimum | 如果指定了 -v,则为 TRUE。 | ||||||
verbose_hook | 如果指定了 -vs,则为 TRUE。 | ||||||
verbose_row_data | 如果指定了 -vr,则为 TRUE。 | ||||||
verbose_row_cnts | 如果指定了 -vn,则为 TRUE。 | ||||||
verbose_option_info | 如果指定了 -vo,则为 TRUE。 | ||||||
strictly_ignore_trigger_ops | 保留;使用 0。 | ||||||
est_upld_row_cnt | 预计要上载的行数,用 -urc 指定。 | ||||||
status_rtn | 保留;使用 NULL。 | ||||||
warningrtn | 显示警告消息的函数。 | ||||||
ce_reproc_argv | 保留,使用 NULL。 | ||||||
upload_only | 如果指定了 -uo,则为 True。 | ||||||
download_only | 如果指定了 -ds,则为 TRUE。 | ||||||
allow_schema_change | 如果指定了 -sc,则为 TRUE。 | ||||||
dnld_gen_num | 如果指定了 -bg,则为 TRUE。 | ||||||
apply_dnld_file | 用 -ba 指定的文件,否则为 NULL。 | ||||||
create_dnld_file | 用 -bc 指定的文件,否则为 NULL。 | ||||||
sync_params | 用户验证参数—使用 -ap 指定。 | ||||||
dnld_file_extra | 用 -be 指定的字符串。 | ||||||
com_server | 保留;使用 NULL。 | ||||||
trans_upload | 如果指定了 -tu,则为 TRUE。 | ||||||
continue_download | 如果指定了 -dc,则为 TRUE。 | ||||||
dnld_read_size | 由 -drs 选项指定的值。 | ||||||
dnld_fail_len | 保留;使用 0。 | ||||||
upld_fail_len | 保留;使用 0。 | ||||||
persist_connection | 如果在命令行上指定了 -pp,则为 TRUE。 | ||||||
verbose_protocol | 保留;使用 0。 | ||||||
no_stream_compress | 保留;使用 0。 | ||||||
encrypted_stream_opts | 保留;使用 NULL。 | ||||||
no_offline_logscan | 如果指定了 -do,则为 TRUE | ||||||
server_mode | 如果指定了 -sm,则为 TRUE | ||||||
allow_outside_connect | 保留;使用 0。 | ||||||
prompt_for_encrypt_key | 保留;使用 0。 | ||||||
com_server_mode | 保留;使用 0。 | ||||||
verbose_server | 保留;使用 0。 | ||||||
server_port | -sp 选项的值。 | ||||||
preload_dlls | 保留;使用 NULL。 | ||||||
sync_profile | 由 -sp 选项指定的值。 | ||||||
sync_opt | 保留;使用 NULL。 | ||||||
last_upload_def | 保留;使用 NULL。 |
有些成员与可从 dbmlsync 命令行实用程序访问的功能相对应。应根据数据类型为未使用的成员指派值 0、FALSE 或 NULL。
有关更多说明,请参见 dbtools.h 头文件。
有关详细信息,请参见dbmlsync 语法。
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |