SqlBulkCopy.ColumnMappings Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a collection of SqlBulkCopyColumnMapping items. Column mappings define the relationships between columns in the data source and columns in the destination.
public:
property System::Data::SqlClient::SqlBulkCopyColumnMappingCollection ^ ColumnMappings { System::Data::SqlClient::SqlBulkCopyColumnMappingCollection ^ get(); };
public System.Data.SqlClient.SqlBulkCopyColumnMappingCollection ColumnMappings { get; }
member this.ColumnMappings : System.Data.SqlClient.SqlBulkCopyColumnMappingCollection
Public ReadOnly Property ColumnMappings As SqlBulkCopyColumnMappingCollection
Property Value
A collection of column mappings. By default, it is an empty collection.
Remarks
If the data source and the destination table have the same number of columns, and the ordinal position of each source column within the data source matches the ordinal position of the corresponding destination column, the ColumnMappings collection is unnecessary. However, if the column counts differ, or the ordinal positions are not consistent, you must use ColumnMappings to make sure that data is copied into the correct columns.
During the execution of a bulk copy operation, this collection can be accessed, but it cannot be changed. Any attempt to change it will throw an InvalidOperationException.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기