DataRow.GetColumnErrorとは? わかりやすく解説

DataRow.GetColumnError メソッド (String)

名前で指定した列のエラーの説明を取得します。

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Function GetColumnError ( _
    columnName As String _
) As String
Dim instance As DataRow
Dim columnName As String
Dim returnValue As String

returnValue = instance.GetColumnError(columnName)
public string GetColumnError (
    string columnName
)
public:
String^ GetColumnError (
    String^ columnName
)
public String GetColumnError (
    String columnName
)
public function GetColumnError (
    columnName : String
) : String

パラメータ

columnName

列の名前。

戻り値
エラーの説明のテキスト。

解説解説
使用例使用例

指定した DataRow にエラーの説明を設定する例を次に示します。

Private Sub SetColError(ByVal
 row As DataRow, _
    byVal columnIndex As Integer)
    Dim errorString As String
 = "Replace this text."

    ' Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString)
End Sub
 
Private Sub PrintColError( _
    ByVal row As DataRow, byVal
 columnIndex As Integer)

    ' Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex))
End Sub
private void SetColError(DataRow row, int
 columnIndex)
{
    string errorString = "Replace this
 text.";

    // Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString);
}
 
private void PrintColError(DataRow row, int
 columnIndex)
{
    // Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRow クラス
DataRow メンバ
System.Data 名前空間
ClearErrors
DataColumnCollection クラス
Contains
DataColumn クラス
GetColumnsInError
HasErrors
RowError
SetColumnError

DataRow.GetColumnError メソッド (DataColumn)

指定した DataColumn のエラーの説明を取得します。

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Function GetColumnError ( _
    column As DataColumn _
) As String
Dim instance As DataRow
Dim column As DataColumn
Dim returnValue As String

returnValue = instance.GetColumnError(column)
public string GetColumnError (
    DataColumn column
)
public:
String^ GetColumnError (
    DataColumn^ column
)
public String GetColumnError (
    DataColumn column
)
public function GetColumnError (
    column : DataColumn
) : String

パラメータ

column

DataColumn。

戻り値
エラーの説明のテキスト。

解説解説
使用例使用例

指定した DataRow にエラーの説明を設定する例を次に示します。

Private Sub SetColError(ByVal
 row As DataRow, _
    byVal columnIndex As Integer)
    Dim errorString As String
 = "Replace this text."

    ' Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString)
End Sub
 
Private Sub PrintColError( _
    ByVal row As DataRow, byVal
 columnIndex As Integer)

    ' Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex))
End Sub
private void SetColError(DataRow row, int
 columnIndex)
{
    string errorString = "Replace this
 text.";

    // Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString);
}
 
private void PrintColError(DataRow row, int
 columnIndex)
{
    // Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRow クラス
DataRow メンバ
System.Data 名前空間
ClearErrors
DataColumnCollection クラス
Contains
DataColumn クラス
GetColumnsInError
GetErrors
HasErrors
RowError
SetColumnError

DataRow.GetColumnError メソッド (Int32)

インデックスで指定した列のエラーの説明を取得します。

名前空間: System.Data
アセンブリ: System.Data (system.data.dll 内)
構文構文

Public Function GetColumnError ( _
    columnIndex As Integer _
) As String
Dim instance As DataRow
Dim columnIndex As Integer
Dim returnValue As String

returnValue = instance.GetColumnError(columnIndex)
public string GetColumnError (
    int columnIndex
)
public:
String^ GetColumnError (
    int columnIndex
)
public String GetColumnError (
    int columnIndex
)
public function GetColumnError (
    columnIndex : int
) : String

パラメータ

columnIndex

列の 0 から始まるインデックス番号。

戻り値
エラーの説明のテキスト。

例外例外
例外の種類条件

IndexOutOfRangeException

引数 columnIndex が範囲外です。

解説解説
使用例使用例

指定した DataRow にエラーの説明を設定する例を次に示します。

Private Sub SetColError(ByVal
 row As DataRow, _
    byVal columnIndex As Integer)
    Dim errorString As String
 = "Replace this text."

    ' Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString)
End Sub
 
Private Sub PrintColError( _
    ByVal row As DataRow, byVal
 columnIndex As Integer)

    ' Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex))
End Sub
private void SetColError(DataRow row, int
 columnIndex)
{
    string errorString = "Replace this
 text.";

    // Set the error for the specified column of the row.
    row.SetColumnError(columnIndex, errorString);
}
 
private void PrintColError(DataRow row, int
 columnIndex)
{
    // Print the error of a specified column.
    Console.WriteLine(row.GetColumnError(columnIndex));
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
DataRow クラス
DataRow メンバ
System.Data 名前空間
ClearErrors
DataColumnCollection クラス
Contains
DataColumn クラス
GetColumnsInError
HasErrors
RowError
SetColumnError

DataRow.GetColumnError メソッド

列のエラーの説明を取得します。
オーバーロードの一覧オーバーロードの一覧

名前 説明
DataRow.GetColumnError (DataColumn) 指定した DataColumn のエラーの説明を取得します。

.NET Compact Framework によってサポートされています。

DataRow.GetColumnError (Int32) インデックスで指定した列のエラーの説明を取得します。

.NET Compact Framework によってサポートされています。

DataRow.GetColumnError (String) 名前で指定した列のエラーの説明を取得します。

.NET Compact Framework によってサポートされています。

参照参照

関連項目

DataRow クラス
DataRow メンバ
System.Data 名前空間
ClearErrors
DataColumnCollection クラス
Contains
DataColumn クラス
GetColumnsInError
GetErrors
HasErrors
RowError
SetColumnError



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「DataRow.GetColumnError」の関連用語

DataRow.GetColumnErrorのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



DataRow.GetColumnErrorのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS