Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 12.0.0 (中文) » UltraLite - C 及 C++ 编程 » 应用程序开发 » 使用嵌入式 SQL 开发应用程序 » 向应用程序添加同步

 

设置同步参数

以下代码启动 TCP/IP 同步。MobiLink 用户名是 Betty Best,口令为 TwentyFour,脚本版本为 default,而运行 MobiLink 服务器的主机是 test.internal,端口为 2439

ul_sync_info synch_info;
ULInitSyncInfo( &synch_info );
synch_info.user_name = UL_TEXT("Betty Best");
synch_info.password = UL_TEXT("TwentyFour");
synch_info.version = UL_TEXT("default");
synch_info.stream = ULSocketStream();
synch_info.stream_parms =
   UL_TEXT("host=test.internal;port=2439");
ULSynchronize( &sqlca, &synch_info );