Product Documentation

FairCom C# Stored Procedures

Previous Topic

Next Topic

Writing .NET SP, UDF, and Triggers

To write a .NET stored procedure (SP), user-defined function (UDF), or trigger, a new project must be created using one of the supplied templates (see Visual Studio .NET Development). The steps below will create a C# stored procedure project.

Tutorials, which follow the format of the standard FairCom tutorials, are provided in drivers\csharp.sql.storedprocs\tutorials\.

Note: The extension for Visual Studio must be installed before you can perform the procedures in this section. See Visual Studio .NET Development.

  1. Open Visual Studio.
  2. Create a new project and, from the templates, select Visual C# > c-tree > Stored Procedure, Trigger and UDF.

    New Project

  3. Set the project name and location and click OK.
  4. From the resulting dialog, pick the Data Source (pre-configured in Visual Studio) or Custom and provide the necessary server connection information (the server does not need to be running).

A new Solution and a new project will be created and opened. In Solution Explorer, you should see one folder for each type of project: Stored Procedures, Triggers, and UDFs.

TOCIndex