Referencing the Adaptive Server ADO.NET Data Provider Classes in Code

Add a line to your source code to reference Adaptive Server ADO.NET Data Provider to be able to use it. You must add a different line for C# that for Visual Basic .NET.

  1. Start Visual Studio .NET.
  2. 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.