asp.net.ph

DataColumnMappingCollection GetByDataSetColumn Method

System.Data.Common Namespace   DataColumnMappingCollection Class


Returns a DataColumnMapping object with the specified DataSetColumn name.

[ VB ]
Public Function GetByDataSetColumn ( _
   ByVal dataSetColumn As String _
) As DataColumnMapping

[ C# ]
public DataColumnMapping GetByDataSetColumn (
   string dataSetColumn
);

[ C++ ]
public: DataColumnMapping* GetByDataSetColumn (
   String* dataSetColumn
);

[ JScript ]
public function GetByDataSetColumn (
   dataSetColumn : String
) : DataColumnMapping;

Parameters

dataSetColumn
The case-insensitive name of the DataSetColumn to find.

Return Value

The DataColumnMapping object with the specified DataSetColumn name.

Exceptions


Exception Type Condition
ArgumentException Thrown if the dataSetColumn parameter is a null reference ( Nothing in Visual Basic ).

Example

The following example demonstrates using the GetByDataSetColumn method to return a specified DataColumnMapping object.

public void FindDataColumnMapping ( DataTableMapping myTableMap ) {
   // get column mappings
   DataColumnMappingCollection myFieldsMaps = myTableMap.ColumnMappings;
   if ( myFieldsMaps.Contains ( "Description" ) ) {
      DataColumnMapping myFieldMap = 
         myFieldsMaps.GetByDataSetColumn ( "datadescription" );
   }
}
  C# VB

See Also

DataColumnMappingCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph