Sugerir traducción
 
Otros han sugerido:

progress indicator
No hay más sugerencias.
Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Ver contenido:  en paraleloVer contenido: en paralelo
.NET Framework Class Library
DataRow..::.GetColumnError Method (Int32)

Gets the error description for the column specified by index.

Namespace:  System.Data
Assembly:  System.Data (in System.Data.dll)
Visual Basic
Public Function GetColumnError ( _
    columnIndex As Integer _
) As String
C#
public string GetColumnError(
    int columnIndex
)
Visual C++
public:
String^ GetColumnError(
    int columnIndex
)
F#
member GetColumnError : 
        columnIndex:int -> string 

Parameters

columnIndex
Type: System..::.Int32
The zero-based index of the column.

Return Value

Type: System..::.String
The text of the error description.
ExceptionCondition
IndexOutOfRangeException

The columnIndex argument is out of range.

Use the SetColumnError method to set column errors.

To determine whether any errors exist for the columns collection, use the HasErrors method. Consequently, you can use the GetColumnsInError method to retrieve all the columns with errors.

To clear all errors for the columns collection, use the ClearErrors method.

The following example sets an error description for a specified DataRow.

Visual Basic
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
C#
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));
}

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Biblioteca de clases de .NET Framework
DataRow..::.GetColumnError (Método) (Int32)

Obtiene la descripción de error para la columna especificada mediante un índice.

Espacio de nombres:  System.Data
Ensamblado:  System.Data (en System.Data.dll)
Visual Basic
Public Function GetColumnError ( _
    columnIndex As Integer _
) As String
C#
public string GetColumnError(
    int columnIndex
)
Visual C++
public:
String^ GetColumnError(
    int columnIndex
)
F#
member GetColumnError : 
        columnIndex:int -> string 

Parámetros

columnIndex
Tipo: System..::.Int32
Índice de base cero de la columna.

Valor devuelto

Tipo: System..::.String
Texto de la descripción de error.
ExcepciónCondición
IndexOutOfRangeException

El argumento columnIndex está fuera de intervalo.

Utilice el método SetColumnError para establecer errores de columna.

Para determinar si existen errores en la colección de columnas, utilice el método HasErrors. Por tanto, puede utilizar el método GetColumnsInError para recuperar todas las columnas con errores.

Para borrar todos los errores de la colección de columnas, utilice el método ClearErrors.

En el ejemplo siguiente se establece una descripción de error para un DataRow especificado.

Visual Basic
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
C#
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));
}

.NET Framework

Compatible con: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Compatible con: 4, 3.5 SP1

Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2

.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker