Referencing Adaptive Server ADO.NET Data Provider classes

To use Adaptive Server ADO.NET Data Provider, you must also add a line to your source code to reference Adaptive Server ADO.NET Data Provider. You must add a different line for C# than for Visual Basic .NET.

Steps Referencing the Adaptive Server ADO.NET Data Provider classes in your code

  1. Start Visual Studio .NET and open your project:

    • For C#, add the following line to the list of using directives at the beginning of your project:

      using Sybase.Data.AseClient;
      
    • For Visual Basic .NET, add the following line at the beginning of your project before the line Public Class Form1:

      Imports Sybase.Data.AseClient
      

      This line is not strictly required. However, it allows you to use short forms for the Adaptive Server classes. Without it, you can still use the following in your code:

      Sybase.Data.AseClient.AseConnection conn = new 
      Sybase.Data.AseClient.AseConnection(); 
      

      use this line instead of:

      AseConnection conn = new AseConnection();
      

      in your code.