RemoveAt

This method removes the mapping from the collection at the specified index.

Declaration

// C#
public void RemoveAt(int index);

Parameters

  • index

    The zero-based index of the OracleBulkCopyColumnMapping object to be removed from the collection.

Exceptions

InvalidOperationException - The bulk copy operation is in progress.

Remarks

The RemoveAt method is most commonly used when a single OracleBulkCopy instance is used to process more than one bulk copy operation. If column mappings are created for one bulk copy operation, mappings that no longer apply must be removed after the WriteToServer method invocation and before the mappings for the next bulk copy are defined. The Clear method can clear the entire collection, and the Remove and the RemoveAt methods can remove mappings individually.

It is usually more efficient to perform several bulk copies using the same OracleBulkCopy instance than to use a separate OracleBulkCopy for each operation.