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

SQL Anywhere 12.0.0 (中文) » QAnywhere » 移动 Web 服务 » 编写移动 Web 服务应用程序

 

设置 .NET 移动 Web 服务应用程序

在将 .NET 同 QAnywhere 一起使用前,必须对 Visual Studio 项目作如下更改:

  • 添加对 QAnywhere .NET DLL 和移动 Web 服务 .NET DLL 的引用。这可通知 Visual Studio 包含哪个 DLL 以找到 QAnywhere .NET API 的代码和移动 Web 服务 .NET API 的代码。

  • 向您的源代码中添加一些行以引用 QAnywhere .NET API 类和移动 Web 服务 .NET API 类。要使用 QAnywhere .NET API,您必须在源代码中添加一行以引用数据提供程序。必须为 C# 添加与 Visual Basic 不同的语句行。

完整的说明如下。

 ♦  在 Visual Studio 项目中添加对 QAnywhere .NET API 和对移动 Web 服务 API 的引用
  1. 启动 Visual Studio 并打开项目。

  2. 在 [Solution Explorer] 窗口中,右击 [References] 文件夹,然后从弹出式菜单中选择 [Add Reference]。

  3. 在 [浏览] 选项卡上,在以下目录中定位 iAnywhere.QAnywhere.Client.dlliAnywhere.QAnywhere.WS.dll

    • .NET Framework 2.0:install-dir\Assembly\V2
    • .NET Compact Framework 2.0:install-dir\ce\Assembly\V2

    在您的环境的适当目录中,选择每个 DLL 并单击 [Open]。

  4. 要验证 DLL 是否已添加到项目,请展开 Solution Explorer 中的 [References] 树。iAnywhere.QAnywhere.Client.dlliAnywhere.QAnywhere.WS.dll 应出现在列表中。

 在源代码中引用数据提供程序类
 另请参见
 示例