Contents Index Understanding the Simple sample project Understanding the Table Viewer sample project

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

Tutorial: Using the Table Viewer code sample


This tutorial is based on the Table Viewer project that is included with the Adaptive Server Anywhere .NET data provider.

The complete application can be found in your SQL Anywhere installation directory at Samples\ASA\ado.net\TableViewer\TableViewer.csproj.

The Table Viewer project is more complex than the Simple project. It illustrates the following features:

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

To run the Table Viewer code sample in Visual Studio .NET

  1. Start Visual Studio .NET.

  2. Choose File > Open > Project.

  3. Browse to SamplesASA\ado.net\TableViewer in your SQL Anywhere installation directory and open the TableViewer.csproj project.

  4. If you want to 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 Table Viewer 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 Table Viewer code sample. To view the using directive:

  6. Choose Debug > Start Without Debugging to run the Table Viewer project.

    The Table Viewer 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 Table Viewer sample project

Contents Index Understanding the Simple sample project Understanding the Table Viewer sample project