Chapter 15 DBMS-Specific Features


CLR procedures and functions

In Microsoft SQL Server 2005, you can write user-defined functions in any Microsoft .NET Framework programming language, such as Microsoft Visual Basic .NET or Microsoft Visual C#. PowerDesigner models CLR procedures and functions as standard procedures that use a CLR template, and are linked to a method from an associated OOM.

Creating a CLR procedure or function

To create a CLR procedure or function, you must have an OOM open in the workspace, in order to specify an associated class method.

Steps To create a CLR procedure or function:

  1. Create a standard procedure or function.
  2. On the Definition Tab of its property sheet, select CLR Procedure or CLR Function from the template list. A Class method field will be displayed to the right of the template list.
  3. Click the Select Method tool to the right of the Class method field, in order to specify the associated method.
  4. Click the Microsoft tab and select an assembly from the list to bind to the procedure or function.
  5. Click OK to close the property sheet.

CLR procedure or function properties

You can modify an object's properties from its property sheet. To open a CLR procedure or function property sheet, double-click its diagram symbol or its Browser entry in the Procedures folder.

The following extended attributes are available on the Microsoft tab:

Name Scripting Name Description
Assembly Assembly Specifies the assembly where the class method is defined.

 


Copyright (C) 2006. Sybase Inc. All rights reserved.