Skip Headers
Oracle® Data Provider for .NET Developer's Guide
11g Release 2 (11.2.0.3)

Part Number E23174-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

OracleBulkCopyColumnMapping Class

The OracleBulkCopyColumnMapping class defines the mapping between a column in the data source and a column in the destination database table.

Class Inheritance

System.Object

  System.OracleBulkCopyColumnMapping

Declaration

// C#
public sealed class OracleBulkCopyColumnMapping

Thread Safety

All public static methods are thread-safe, although instance methods do not guarantee thread safety.

Remarks

Column mappings define the mapping between data source and the target table.

It is not necessary to specify column mappings for all the columns in the data source. If a ColumnMapping is not specified, then, by default, columns are mapped based on the ordinal position. This succeeds only if the source and destination table schema match. If there is a mismatch, an InvalidOperationException is thrown.

All the mappings in a mapping collection must be by name or ordinal position.

Note:

Oracle Data Provider for .NET makes one or more round-trips to the database to determine the column name if the mapping is specified by ordinal position. To avoid this performance overhead, specify the mapping by column name.

Example

// C#

Requirements

Namespace: Oracle.DataAccess.Client

Assembly: Oracle.DataAccess.dll

ODP.NET Version: ODP.NET for .NET Framework 2.0 or ODP.NET for .NET Framework 4


OracleBulkCopyColumnMapping Members

OracleBulkCopyColumnMapping members are listed in the following tables.

OracleBulkCopyColumnMapping Constructors

The OracleBulkCopyColumnMapping constructors are listed in Table 17-8.

Table 17-8 OracleBulkCopyColumnMapping Constructors

Constructor Description

OracleBulkCopyColumnMapping Constructors

Instantiates new instances of the OracleBulkCopyColumnMapping class


OracleBulkCopyColumnMapping Properties

The OracleBulkCopyColumnMapping properties are listed in Table 17-9.

Table 17-9 OracleBulkCopyColumnMapping Properties

Property Description

DestinationColumn

Specifies the column name of the destination table that is being mapped

DestinationOrdinal

Specifies the column ordinal value of the destination table that is being mapped

SourceColumn

Specifies the column name of the data source that is being mapped

SourceOrdinal

Specifies the column ordinal value of the data source that is being mapped



OracleBulkCopyColumnMapping Constructors

OracleBulkCopyColumnMapping constructors instantiates new instances of the OracleBulkCopyColumnMapping class.

Overload List:

OracleBulkCopyColumnMapping()

This constructor instantiates a new instance of the OracleBulkCopyColumnMapping class.

Declaration

// C#
public OracleBulkCopyColumnMapping();

Remarks

Applications that use this constructor must define the source for the mapping using the SourceColumn or SourceOrdinal property, and must define the destination for the mapping using the DestinationColumn or DestinationOrdinal property.

OracleBulkCopyColumnMapping(int, int)

This constructor instantiates a new instance of the OracleBulkCopyColumnMapping class using the provided source and destination column ordinal positions.

Declaration

// C#
public OracleBulkCopyColumnMapping(int sourceColumnOrdinal, 
   int destinationOrdinal);

Parameters

OracleBulkCopyColumnMapping(int, string)

This constructor instantiates a new instance of the OracleBulkCopyColumnMapping class using the provided source column ordinal and destination column name.

Declaration

// C#
public OracleBulkCopyColumnMapping(int sourceColumnOrdinal, 
   string destinationColumn);

Parameters

OracleBulkCopyColumnMapping(string, int)

This constructor instantiates a new instance of the OracleBulkCopyColumnMapping class using the provided source column name and destination column ordinal.

Declaration

// C#
public OracleBulkCopyColumnMapping(string sourceColumn, int destinationOrdinal);

Parameters

OracleBulkCopyColumnMapping(string, string)

This constructor instantiates a new instance of the OracleBulkCopyColumnMapping class using the provided source and destination column names.

Declaration

// C#
public OracleBulkCopyColumnMapping(string sourceColumn, string destinationColumn);

Parameters


OracleBulkCopyColumnMapping Properties

The OracleBulkCopyColumnMapping properties are listed in Table 17-10.

Table 17-10 OracleBulkCopyColumnMapping Properties

Property Description

DestinationColumn

Specifies the column name of the destination table that is being mapped

DestinationOrdinal

Specifies the column ordinal value of the destination table that is being mapped

SourceColumn

Specifies the column name of the data source that is being mapped

SourceOrdinal

Specifies the column ordinal value of the data source that is being mapped


DestinationColumn

This property specifies the column name of the destination table that is being mapped.

Declaration

// C#
public string DestinationColumn {get; set;}

Property Value

A string value that represents the destination column name of the mapping.

Remarks

The DestinationColumn and DestinationOrdinal properties are mutually exclusive. The last value set takes precedence.

DestinationOrdinal

This property specifies the column ordinal value of the destination table that is being mapped.

Declaration

// C#
public int DestinationOrdinal {get; set;}

Property Value

An integer value that represents the destination column ordinal of the mapping.

Exceptions

IndexOutOfRangeException - The destination ordinal is invalid.

Remarks

The DestinationOrdinal and DestinationColumn properties are mutually exclusive. The last value set takes precedence.

SourceColumn

This property specifies the column name of the data source that is being mapped.

Declaration

// C#
public string SourceColumn {get; set;}

Property Value

A string value that represents the source column name of the mapping.

Remarks

The SourceColumn and SourceOrdinal properties are mutually exclusive. The last value set takes precedence.

SourceOrdinal

This property specifies the column ordinal value of the data source that is being mapped.

Declaration

// C#
public int SourceOrdinal {get; set;}

Property Value

An integer value that represents the source column ordinal of the mapping.

Exceptions

IndexOutOfRangeException - The source ordinal is invalid.

Remarks

The SourceOrdinal and SourceColumn properties are mutually exclusive. The last value set takes precedence.