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

SQL Anywhere 11.0.1 (中文) » UltraLite - M-Business Anywhere 编程 » 了解 UltraLite for M-Business Anywhere 开发 » 同步数据

 

一键同步

一键同步是一种在单个操作中启动 Web 内容同步(使用 M-Business Anywhere)和 UltraLite 数据同步(使用 MobiLink)的技术。它仅在 Windows Mobile 和 Windows 上可用。一键同步的体系结构如下所示:

一键同步的体系结构,显示了使用 M-Business Anywhere 的 Web 内容同步和使用 MobiLink 的数据同步。

一键同步中事件的顺序如下所示:

  1. 用户可能通过将其 Web 应用程序置于底座中来同步它们。

  2. M-Business 客户端同步 Web 内容。

  3. M-Business 客户端的 MBConnect 组件调用 ulconnect.exe 应用程序。

  4. ulconnect.exe 启动 UltraLite 数据库同步。

  5. 数据与 MobiLink 同步。

要实现一键同步,您必须执行以下步骤:

  1. 在您的应用程序中,为 MobiLink 同步设置同步参数。

    如果您通过 M-Business Anywhere 进行同步,可以使用 SyncParms.setMBAServer 方法设置主机和端口同步参数。请参见setMBAServer 方法

    否则,使用标准方法设置同步参数。请参见SyncParms 类

  2. 保存同步参数以使它们能被 ulconnect.exe 读取。

    调用 Connection.saveSyncParms 方法来保存同步参数。请参见saveSyncParms 方法