mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-24 18:04:52 +08:00
Update blueCopy
This commit is contained in:
parent
8d3a6f8d65
commit
bd8f269caf
@ -51,7 +51,15 @@ namespace SqlSugar
|
||||
{
|
||||
this.Context.Ado.Connection.Open();
|
||||
}
|
||||
bulkCopy.WriteToServer(dt);
|
||||
try
|
||||
{
|
||||
bulkCopy.WriteToServer(dt);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Context.Ado.Connection.Close();
|
||||
throw ex;
|
||||
}
|
||||
if (this.Context.CurrentConnectionConfig.IsAutoCloseConnection && this.Context.Ado.Transaction == null)
|
||||
{
|
||||
this.Context.Ado.Connection.Close();
|
||||
|
Loading…
Reference in New Issue
Block a user