Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2) Part Number E12249-01 |
|
|
View PDF |
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
Microsoft .NET Framework Version: 2.0 or later
See Also:
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 |
---|---|
Instantiates new instances of the |
OracleBulkCopyColumnMapping Properties
The OracleBulkCopyColumnMapping
properties are listed in Table 17-9.
Table 17-9 OracleBulkCopyColumnMapping Properties
Property | Description |
---|---|
Specifies the column name of the destination table that is being mapped |
|
Specifies the column ordinal value of the destination table that is being mapped |
|
Specifies the column name of the data source that is being mapped |
|
Specifies the column ordinal value of the data source that is being mapped |
OracleBulkCopyColumnMapping
constructors instantiates new instances of the OracleBulkCopyColumnMapping
class.
Overload List:
This constructor instantiates a new instance of the OracleBulkCopyColumnMapping
class
OracleBulkCopyColumnMapping(int, int)
This constructor instantiates a new instance of the OracleBulkCopyColumnMapping
class using the provided source column ordinal and destination column ordinal.
OracleBulkCopyColumnMapping(int, string)
This constructor instantiates a new instance of the OracleBulkCopyColumnMapping
class using the provided source column ordinal and destination column name.
OracleBulkCopyColumnMapping(string, int)
This constructor instantiates a new instance of the OracleBulkCopyColumnMapping
class using the provided source column name and destination column ordinal.
OracleBulkCopyColumnMapping(string, string)
This constructor instantiates a new instance of the OracleBulkCopyColumnMapping
class using the provided source column name and destination column name.
See Also:
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.
See Also:
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
sourceColumnOrdinal
The ordinal position of the source column within the data source.
destinationOrdinal
The ordinal position of the destination column within the destination table.
See Also:
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
sourceColumnOrdinal
The ordinal position of the source column within the data source.
destinationColumn
The name of the destination column within the destination table.
See Also:
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
sourceColumn
The name of the source column within the data source.
destinationOrdinal
The ordinal position of the destination column within the destination table.
See Also:
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
sourceColumn
The name of the source column within the data source.
destinationColumn
The name of the destination column within the destination table.
See Also:
The OracleBulkCopyColumnMapping
properties are listed in Table 17-10.
Table 17-10 OracleBulkCopyColumnMapping Properties
Property | Description |
---|---|
Specifies the column name of the destination table that is being mapped |
|
Specifies the column ordinal value of the destination table that is being mapped |
|
Specifies the column name of the data source that is being mapped |
|
Specifies the column ordinal value of the data source that is being mapped |
See Also:
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.
See Also:
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.
See Also:
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.
See Also:
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.