MS SQL Maestro online Help
		
CLR UDFs
User-defined functions are routines that can take parameters, perform calculations or other actions, and return a result. 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 C#.
 
|   New CLR UDFs are created within Create CLR UDF Wizard. In order to run the wizard you should either   | • | select the Object | Create Database Object... main menu item; | 
| • | select the CLR UDF icon in the Create Database Object dialog | 
or | • | select the CLR UDFs list or any object from that list in the explorer tree; | 
| • | select the Create New CLR UDF... item from the popup menu | 
or | • | open the schema in Schema Editor and the CLR UDFs tab there; | 
| • | press the Insert key or select the Create New CLR UDF... item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). | 
         To create a new CLR UDF with the same properties as one of the existing CLR UDFs has:   | • | select the Object | Duplicate Database Object... main menu item; | 
| • | follow the instructions of Duplicate Object Wizard. | 
  | 
 
|   CLR UDFs can be edited within CLR UDF Editor. In order to run the editor you should either   | • | select the CLR UDF for editing in the explorer tree (type the first letters of the CLR UDF name for quick search); | 
| • | select the Edit CLR UDF ... item from the popup menu | 
or | • | open the schema in Schema Editor and the CLR UDFs tab there; | 
| • | select the CLR UDF to edit; | 
| • | press the Enter key or select the Edit CLR UDF item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). | 
         You can change the name of the CLR UDF using the Rename CLR UDF dialog. To open the dialog you should either   | • | select the CLR UDF to rename in the explorer tree; | 
| • | select the Rename CLR UDF item from the popup menu | 
or | • | open the schema in Schema Editor and the CLR UDFs tab there; | 
| • | select the CLR UDF to rename; | 
| • | select the Rename CLR UDF item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar). | 
  | 
 
|   To execute a CLR UDF:   | • | select the CLR UDF in the explorer tree (type the first letters of the CLR UDF name for quick search); | 
| • | select the Edit CLR UDF ... item from the popup menu; | 
| • | execute the CLR UDF using the Execute link of the Navigation Bar | 
or | • | open the schema in Schema Editor and the CLR UDFs tab there; | 
| • | select the CLR UDF to execute; | 
| • | press the Enter key or select the Edit CLR UDF item from the popup menu, or use the corresponding link of the Navigation Bar; | 
| • | execute the CLR UDF using the Execute link of the Navigation bar. | 
  | 
 
|   To drop a CLR UDF:   | • | select the CLR UDF to drop in the explorer tree; | 
| • | select the Drop CLR UDF item from the popup menu | 
or | • | open the schema in Schema Editor and the CLR UDFs tab there; | 
| • | select the CLR UDF to drop; | 
| • | press the Delete key or select the Drop CLR UDF item from the popup menu (alternatively, you may use the corresponding link of the Navigation Bar) | 
  and confirm dropping in the dialog window.   |