Contents Index Using the Adaptive Server Anywhere .NET Data Provider Sample Applications Understanding the Simple sample project

ASA Programming Guide
  Using the Adaptive Server Anywhere .NET Data Provider Sample Applications

Tutorial: Using the Simple code sample


This tutorial is based on the Simple project that is included with the .NET data provider.

The complete application can be found in your SQL Anywhere installation directory at Samples\ASA\ADO.NET\SimpleWin32\Simple.csproj.

The Simple project illustrates the following features:

For more information about how the sample works, see Understanding the Simple sample project.

To run the Simple code sample in Visual Studio .NET

  1. Start Visual Studio .NET.

  2. Choose File > Open > Project.

  3. Browse to Samples\ASA\ADO.NET\SimpleWin32 in your SQL Anywhere installation directory and open the Simple.csproj project.

  4. When you use the Adaptive Server Anywhere .NET data provider in a project, you must add a reference to the data provider DLL. This has already been done in the Simple code sample. You can view the reference to the data provider DLL in the following location:

  5. You must also add a using directive to your source code to reference the data provider classes. This has already been done in the Simple code sample. To view the using directive:

  6. To run the Simple sample, choose Debug > Start Without Debugging or press Ctrl+F5.

    The AsaSample dialog appears.

  7. Click the X in the upper right corner of the screen to terminate the application and disconnect from the sample database. This also shuts down the database server.

You have now run the application. The next section describes the application code.


Understanding the Simple sample project

Contents Index Using the Adaptive Server Anywhere .NET Data Provider Sample Applications Understanding the Simple sample project