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

SQL Anywhere 12.0.1 » QAnywhere » How to write QAnywhere client applications » Initializing a QAnywhere API


Setting up .NET applications

Before you can send or receive messages using QAnywhere .NET clients, you must complete the following initialization tasks.

You must make two changes to your Visual Studio project to be able to use it:

  • Add a reference to the QAnywhere .NET DLL. Adding a reference tells Visual Studio .NET which DLL to include to find the code for the QAnywhere .NET API.

  • Add a line to your source code to reference the QAnywhere .NET API classes. To use the QAnywhere .NET API, you must add a line to your source code to reference the data provider. You must add a different line for C# than for Visual Basic .NET.

In addition, you must initialize the QAnywhere .NET API.

 Add a reference to the QAnywhere .NET API in a Visual Studio project
  1. Start Visual Studio and open your project.

  2. In the Solution Explorer window, right-click the References folder and click Add Reference.

  3. On the .NET tab, click Browse to locate iAnywhere.QAnywhere.Client.dll. The default locations are:

    • .NET Framework 2.0: %SQLANY12%\Assembly\V2
    • .NET Compact Framework 2.0: %SQLANY12%\ce\Assembly\V2

    Select the DLL and click Open.

  4. You can verify that the DLL is added to your project. Open the Add Reference window and then click the .NET tab. iAnywhere.QAnywhere.Client.dll appears in the Selected Components list. Click OK to close the window.

 Referencing the data provider classes in your source code
 See also