Update access bug

This commit is contained in:
sunkaixuan
2022-11-13 19:17:54 +08:00
parent a3f612c835
commit ebc34fa414

View File

@@ -312,13 +312,16 @@ namespace SqlSugar
}
result = Ado.GetInt(sql.Split(';').First(), InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
result = Ado.GetInt(sql.Split(';').Last(), InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
if(this.Context.Ado.IsAnyTran() == false && isAuto)
if (this.Context.Ado.IsAnyTran() == false && isAuto)
{
this.Ado.Close();
this.Context.CurrentConnectionConfig.IsAutoCloseConnection = isAuto;
}
}
result =await Ado.GetIntAsync(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
else
{
result = await Ado.GetIntAsync(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray());
}
After(sql, result);
return result;
}
@@ -396,7 +399,10 @@ namespace SqlSugar
this.Context.CurrentConnectionConfig.IsAutoCloseConnection = isAuto;
}
}
result = Convert.ToInt64(await Ado.GetScalarAsync(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray()));
else
{
result = Convert.ToInt64(await Ado.GetScalarAsync(sql, InsertBuilder.Parameters == null ? null : InsertBuilder.Parameters.ToArray()));
}
After(sql, result);
return result;
}