我正在做一个大规模的插入/更新操作。
所以我正在使用SqlBulkCopy
.
SqlConnection myConnection = new SqlConnection(myConnectionString);
try
{
myConnection.Open();
SqlBulkCopy myCommand = new SqlBulkCopy(myConnection);
myCommand.DestinationTableName = "myDestinationTableName";
//Below method has four overloads;
//of which I am interested in the two mentioned below.
myCommand.WriteToServer();
myCommand.Close();
}
finally
{
myConnection.Close();
}
但是我偶然发现了这两个版本的WriteToServer
方法。
问题:一个比另一个有什么优点和缺点?哪个更快?