a_sync_db structure

Holds information needed for the dbmlsync utility using the DBTools library.

Syntax
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;
Members
Member Description
version DBTools version number.
connectparms

Parameters needed to connect to the database. They take the form of connection strings, such as the following:

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db"

The database server would be started by the connection string START parameter. For example:

"START=d:\sqlany11\bin32\dbeng11.exe"

A full example connection string including the START parameter:

"UID=DBA;PWD=sql;DBF=samples-dir\demo.db;START=d:\sqlany11\bin32\dbeng11.exe"

For a list of connection parameters, see Connection parameters.

publication Deprecated; use NULL.
offline_dir Log directory, as specified on the command line after the options.
extended_options Extended options, as specified with -e.
script_full_path Deprecated; use NULL.
include_scan_range Reserved; use NULL.
raw_file Reserved; use NULL.
confirmrtn Reserved; use NULL.
errorrtn Function to display error messages.
msgrtn Function to write messages to the user interface and, optionally, to the log file.
logrtn Function to write messages only to the log file.
debug_dump_size Reserved; use 0.
dl_insert_width Reserved; use 0.
verbose Deprecated; use 0.
debug Reserved; use 0.
debug_dump_hex Reserved; use 0.
debug_dump_char Reserved; use 0.
debug_page_offsets Reserved; use 0.
use_hex_offsets Reserved; use 0.
use_relative_offsets Reserved; use 0.
output_to_file Reserved; use 0.
output_to_mobile_link Reserved; use 1.
dl_use_put Reserved; use 0.
kill_other_connections TRUE if -d option is specified.
retry_remote_behind TRUE if -r or -rb is specified.
ignore_debug_interrupt Reserved; use 0.
set_window_title_rtn Function to call to change the title of the dbmlsync window (Windows only).
default_window_title Name of the program to display in the window caption (for example, DBMLSync).
msgqueuertn

Function called by DBMLSync when it wants to sleep. The parameter specifies the sleep period in milliseconds. The function should return the following, as defined in dllapi.h.

  • MSGQ_SLEEP_THROUGH indicates that the routine slept for the requested number of milliseconds. In most cases this is the value you should return.
  • MSGQ_SHUTDOWN_REQUESTED indicates that you would like the synchronization to terminate as soon as possible.
  • MSGQ_SYNC_REQUESTED indicates that the routine slept for less than the requested number of milliseconds and that the next synchronization should begin immediately if a synchronization is not currently in progress.
progress_msg_rtn Function to change the text in the status window, above the progress bar.
progress_index_rtn Function to update the state of the progress bar.
argv argv array for this run; the last element of the array must be NULL.
ce_argv Reserved; use NULL.
connectparms_allocated Reserved; use 0.
entered_dialog Reserved; use 0.
used_dialog_allocation Reserved; use 0.
ignore_scheduling TRUE if -is was specified.
ignore_hook_errors TRUE if -eh was specified.
changing_pwd TRUE if -mn was specified.
prompt_again Reserved—use 0.
retry_remote_ahead TRUE if -ra was specified.
rename_log TRUE if -x was specified, in which case the log file is renamed and restarted.
hide_conn_str TRUE unless -vc was specified.
hide_ml_pwd TRUE unless -vp was specified.
dlg_launch_focus Reserved; use 0.
mlpassword MobiLink password specified with -mp; NULL otherwise.
new_mlpassword New MobiLink password specified with -mn; NULL otherwise.
verify_mlpassword Reserved; use NULL.
pub_name_cnt Deprecated; use 0.
pub_name_list Deprecated; use NULL.
usage_rtn Reserved; use NULL.
log_size Log size in bytes, as specified with -x; otherwise 0.
hovering_frequency Hovering frequency in seconds; as set with -pp.
ignore_hovering True if -p was specified.
verbose_upload True if -vu was specified.
verbose_upload_data Reserved; use 0.
verbose_download Reserved; use 0.
verbose_download_data Reserved; use 0.
autoclose TRUE if -k was specified.
ping TRUE if -pi was specified.
encryption_key Database key, as specified with -ek.
upload_defs Linked list of publications to be uploaded together—see a_syncpub.
log_file_name Database server message log file name specified with -o or -ot.
user_name MobiLink user name, specified with -u.
verbose_minimum TRUE if -v was specified.
verbose_hook TRUE if -vs was specified.
verbose_row_data TRUE if -vr was specified.
verbose_row_cnts TRUE if -vn was specified.
verbose_option_info TRUE if -vo was specified.
strictly_ignore_trigger_ops Reserved; use 0.
est_upld_row_cnt Estimated number of rows to upload, specified with -urc.
status_rtn Reserved; use NULL.
warningrtn Function to display warning messages.
ce_reproc_argv Reserved, use NULL.
upload_only True if -uo was specified.
download_only TRUE if -ds was specified.
allow_schema_change TRUE if -sc was specified.
dnld_gen_num TRUE if -bg was specified.
apply_dnld_file File specified with -ba; otherwise NULL.
create_dnld_file File specified with -bc; otherwise NULL.
sync_params User authentication parameters—specified with -ap.
dnld_file_extra String specified with -be.
com_server Reserved; use NULL.
trans_upload TRUE if -tu was specified.
continue_download TRUE if -dc is specified.
dnld_read_size Value specified by -drs option.
dnld_fail_len Reserved; use 0.
upld_fail_len Reserved; use 0.
persist_connection TRUE if -pp is specified on command line.
verbose_protocol Reserved; use 0.
no_stream_compress Reserved; use 0.
encrypted_stream_opts Reserved; use NULL.
no_offline_logscan TRUE if -do is specified
server_mode TRUE if -sm specified
allow_outside_connect Reserved; use 0.
prompt_for_encrypt_key Reserved; use 0.
com_server_mode Reserved; use 0.
verbose_server Reserved; use 0.
server_port Value from -sp option.
preload_dlls Reserved; use NULL.
sync_profile Value specified with -sp option.
sync_opt Reserved; use NULL.
last_upload_def Reserved; use NULL.

Some members correspond to features accessible from the dbmlsync command line utility. Unused members should be assigned the value 0, FALSE, or NULL, depending on data type.

See the dbtools.h header file for additional comments.

For more information, see dbmlsync syntax.

See also