ComponentOne ADO.NET DataExtender
C1.C1DataExtender.2 Assembly / C1.C1DataExtender Namespace / C1DataView Class / FindByPrimaryKey Method / FindByPrimaryKey(Object) Method
A primary key value. The PrimaryKey property must contain a single C1ViewColumn. If the System.Type of the value differs from the C1ViewColumn.DataType of the corresponding primary key column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

In This Topic
    FindByPrimaryKey(Object) Method
    In This Topic
    Finds a row in this C1DataView by the specified primary key value.
    Syntax
    'Declaration
     
    Public Overloads Function FindByPrimaryKey( _
       ByVal key As System.Object _
    ) As System.Integer
    public System.int FindByPrimaryKey( 
       System.object key
    )

    Parameters

    key
    A primary key value. The PrimaryKey property must contain a single C1ViewColumn. If the System.Type of the value differs from the C1ViewColumn.DataType of the corresponding primary key column then this value will be converted to the column's target type automatically. In the case where such a conversion is impossible, an exception will be raised.

    Return Value

    An index of found row or -1 if row has not been found.
    See Also