Specify the application type for ADO.NET Accelerator

ADO.NET Accelerator supports two types of applications: Windows Forms and ASP.NET applications. You need to specify which type of application you are working with. To specify the application type you need to add the ApplicationSettings attribute to the AssemblyInfo file.

Specifying the application type for an ASP.NET web application

For VS 2002

  1. Open the AssemblyInfo file located at the root of your ASP.NET web application project and copy the line of code showed below.

    //For C#

    [assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Web)]


    'For VB.NET

    <Assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Web)>

For VS 2005

  1. Add the App_Code ASP.NET folder to your web site project. On the menu click on Website, then Add ASP.NET folder, then on App_Code. Another option is to right-click the root web site in the Solution Explorer, then select Add ASP.NET folder, then App_Code.
  2. Add a new class to the App_Code folder and name it AssemblyInfo.
  3. Delete all the code generated automatically by Visual Studio and add the following line of code.

    //For C#

    [assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Web)]


    'For VB.NET

    <Assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Web)>

Specifying the application type for a Windows Forms application

For VS 2002

  1. Open the AssemblyInfo file located at the root of your Windows Forms application project and copy the line of code showed below.

    //For C#

    [assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Windows)]


    'For VB.NET

    <Assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Windows)>

For VS 2005

  1. Open the AssemblyInfo file located in the Properties folder and copy the line of code showed below.

    //For C#

    [assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Windows)]


    'For VB.NET

    <Assembly: SqlNetFramework.Configuration.ApplicationSettings(SqlNetFramework.Configuration.ApplicationType.Windows)>

Next: Adding the web.config/winApp.exe.config file