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

SAP Sybase SQL Anywhere 16.0 (中文) » SQL Anywhere 服务器 - 数据库管理 » SQL Anywhere 数据库连接 » SQL Anywhere for Windows Mobile » 连接到在 Windows Mobile 设备上运行的数据库

 

创建 ODBC 数据源以连接到 Windows Mobile 设备

可以创建 ODBC 数据源以连接到在 Windows Mobile 设备上运行的数据库。

前提条件

执行此任务没有前提条件。

 任务
  1. 在 Windows 计算机中,单击 [开始] » [程序] » [SQL Anywhere 16] » [管理工具] » [ODBC 数据源管理器]。

  2. 在 [用户 DSN] 选项卡上,单击 [添加]。

  3. 单击 [SQL Anywhere 16],然后单击 [完成]。

  4. 在 [ODBC] 选项卡上,在 [数据源名称] 字段中键入 MobileServer

  5. 单击 [登录] 选项卡并填写以下字段:

    • 验证   单击 [数据库]。

    • 用户 ID   确保此字段为空。每次连接到数据库时,您都必须提供用户 ID 和口令。

    • 口令   确保此字段为空。[加密口令] 框应清空。

    • 操作   单击 [连接到另一台计算机上正在运行的数据库]。

    • 主机   如果您使用 Windows Mobile 设备中心 (ActiveSync) 连接到 Windows Mobile 5.0 或 6.0 设备(通过 USB 连接),请尝试 Windows Mobile 设备 IP 地址 169.254.2.1

      对于某些 Windows Mobile 设备,特别是较旧的设备,使用此地址时可能会遇到困难。如果是这样,请尝试使用本地主机 (127.0.0.1) IP 地址。在这种情况下,您还必须设置代理端口。

    • 端口   指定 Windows Mobile 设备监听的端口号。

      使用 Windows Mobile 设备上的数据库服务器配置为在启动时使用的端口。建议您使用端口 2639。请参见在 Windows Mobile 设备上启动数据库服务器并连接到数据库

    • 服务器名   如果您需要连接到 Windows Mobile 设备上运行的特定数据库服务器,请填写服务器名。否则,确保此字段为空。

    • 数据库名   如果您需要连接到 Windows Mobile 设备上运行的特定数据库,请填写数据库名。否则,确保此字段为空。

  6. 单击 [确定]。

结果

现在,您可以使用此数据源从 Windows 台式计算机连接到 Windows Mobile 设备上运行的数据库。

下一个

要测试连接,您可以使用 dbping 实用程序。如果已在 Windows Mobile 设备上启动数据库,请使用类似如下的命令测试连接。

dbping -c "DSN=MobileServer;UID=DBA;PWD=sql"
 另请参见