EventClass.FieldTypeMods Method

イベント クラス内のフィールドのフィールド修飾子を取得します。

名前空間: Microsoft.SqlServer.NotificationServices
アセンブリ: Microsoft.SqlServer.NotificationServices (microsoft.sqlserver.notificationservices.dll 内)

構文

'宣言
Public Function FieldTypeMods ( _
    fieldOrdinal As Integer _
) As String
public string FieldTypeMods (
    int fieldOrdinal
)
public:
virtual String^ FieldTypeMods (
    int fieldOrdinal
) sealed
public final String FieldTypeMods (
    int fieldOrdinal
)
public final function FieldTypeMods (
    fieldOrdinal : int
) : String

パラメータ

  • fieldOrdinal
    イベント クラス定義内のフィールドの位置を示す、0 から始まる序数です。

戻り値

このデータ フィールドのフィールド修飾子を表す String です (指定されている場合)。フィールド修飾子には、フィールドに NULL 値を入力できるかどうか、既定値があるかどうかなどの情報が格納されています。

使用例

FieldTypeMods メソッドを使用し、フィールドの序数を指定することによってイベント クラス フィールドのフィールド修飾子を取得する例を次に示します。

これらの例では、Microsoft.SqlServer.NotificationServices 名前空間を使用しています。

Dim instanceName As String = "MyInstanceName"
Dim applicationName As String = "MyApplicationName"
Dim eventClassName As String = "MyEventClassName"
Dim fieldOrdinal As Integer = 0

'Create an NSInstance object.
Dim myInstance As New NSInstance(instanceName)

'Create an NSApplication object.
Dim myApplication As New NSApplication(myInstance, applicationName)

'Create an EventClassEnumeration object.
Dim myEventClassEnumeration As _
    New EventClassEnumeration(myApplication)

'Use the EventClassEnumeration.Item 
'to return an EventClass object.
Dim myEventClass As EventClass = _
    myEventClassEnumeration(eventClassName)

'Use the FieldTypeMods method to get a field's modifiers.
Dim fieldTypeMods As String = _
    myEventClass.FieldTypeMods(fieldOrdinal)
string instanceName = "MyInstanceName";
string applicationName = "MyApplicationName";
string eventClassName = "MyEventClassName";
int fieldOrdinal = 0;

//Create an NSInstance object.
NSInstance myInstance = new NSInstance(instanceName);

//Create an NSApplication object.
NSApplication myApplication = 
    new NSApplication(myInstance, applicationName);

//Create an EventClassEnumeration object.
EventClassEnumeration myEventClassEnumeration = 
    new EventClassEnumeration(myApplication);

//Use the EventClassEnumeration.Item 
//to return an EventClass object.
EventClass myEventClass = 
    myEventClassEnumeration[eventClassName];

//Use the FieldTypeMods method to get a field's modifiers.
string fieldTypeMods = 
    myEventClass.FieldTypeMods(fieldOrdinal);

スレッド セーフ

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

プラットフォーム

開発プラットフォーム

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

対象プラットフォーム

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

参照

関連項目

EventClass Class
EventClass Members
Microsoft.SqlServer.NotificationServices Namespace