Oracle® Data Provider for .NET Developer's Guide 11g Release 2 (11.2.0.3) Part Number E23174-02 |
|
|
PDF · Mobi · ePub |
The OracleBulkCopyColumnMapping
class defines the mapping between a column in the data source and a column in the destination database table.
System.Object
System.OracleBulkCopyColumnMapping
// C# public sealed class OracleBulkCopyColumnMapping
All public static methods are thread-safe, although instance methods do not guarantee thread safety.
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.// C#
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
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.
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.
// C# public OracleBulkCopyColumnMapping();
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.
// C# public OracleBulkCopyColumnMapping(int sourceColumnOrdinal, int destinationOrdinal);
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.
// C# public OracleBulkCopyColumnMapping(int sourceColumnOrdinal, string destinationColumn);
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.
// C# public OracleBulkCopyColumnMapping(string sourceColumn, int destinationOrdinal);
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.
// C# public OracleBulkCopyColumnMapping(string sourceColumn, string destinationColumn);
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.
// C# public string DestinationColumn {get; set;}
A string value that represents the destination column name of the mapping.
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.
// C# public int DestinationOrdinal {get; set;}
An integer value that represents the destination column ordinal of the mapping.
IndexOutOfRangeException
- The destination ordinal is invalid.
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.
// C# public string SourceColumn {get; set;}
A string value that represents the source column name of the mapping.
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.
// C# public int SourceOrdinal {get; set;}
An integer value that represents the source column ordinal of the mapping.
IndexOutOfRangeException
- The source ordinal is invalid.
The SourceOrdinal
and SourceColumn
properties are mutually exclusive. The last value set takes precedence.