次の方法で共有


Database.UserDefinedFunctions Property

UserDefinedFunction オブジェクトのコレクションを表します。各 UserDefinedFunction オブジェクトは、データベース上のユーザー定義関数を表します。

名前空間: Microsoft.SqlServer.Management.Smo
アセンブリ: Microsoft.SqlServer.Smo (microsoft.sqlserver.smo.dll 内)

構文

'宣言
Public ReadOnly Property UserDefinedFunctions As UserDefinedFunctionCollection
public UserDefinedFunctionCollection UserDefinedFunctions { get; }
public:
property UserDefinedFunctionCollection^ UserDefinedFunctions {
    UserDefinedFunctionCollection^ get ();
}
/** @property */
public UserDefinedFunctionCollection get_UserDefinedFunctions ()
public function get UserDefinedFunctions () : UserDefinedFunctionCollection

プロパティ値

データベース上のすべてのユーザー定義関数を表す UserDefinedFunctionCollection オブジェクト。

解説

更新されたテキスト :2006 年 7 月 17 日

このコレクションを使用し、ユーザー定義関数の名前を指定することによって、特定のユーザー定義関数を参照できます。新しいユーザー定義関数をコレクションに追加するには、ユーザー定義関数コンストラクタ UserDefinedFunction を呼び出します。

この名前空間、クラス、またはメンバは、Microsoft .NET Framework Version 2.0 でのみサポートされています。

使用例

'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server

'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")

'Display all the user defined functions in the database.
Dim udf As UserDefinedFunction
For Each udf In db.UserDefinedFunctions
   Console.WriteLine(udf.Name)
Next

スレッド セーフ

この型の public static (Microsoft Visual Basic では共有 ) メンバは、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。

プラットフォーム

開発プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

対象プラットフォーム

サポートされているプラットフォームの一覧については、「SQL Server 2005 のインストールに必要なハードウェアおよびソフトウェア」を参照してください。

参照

関連項目

Database Class
Database Members
Microsoft.SqlServer.Management.Smo Namespace

その他の技術情報

Visual Basic .NET でデータベースを作成、変更、および削除する方法
ユーザー定義関数の作成、変更、および削除
データベースの作成、変更、および削除
CREATE DATABASE (Transact-SQL)

変更履歴

リリース

履歴

2006 年 7 月 17 日

変更内容 :
  • 「解説」セクションに説明を追加しました。

  • 「例」セクションにコードを追加しました。