mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 22:11:36 +08:00
Synchronization code
This commit is contained in:
parent
308e931cee
commit
db008d1d2c
@ -183,6 +183,10 @@ namespace SqlSugar
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (this.Context.CurrentConnectionConfig?.DbType==DbType.SqlServer&&ex.Message?.Contains("provider: SSL")==true)
|
||||
{
|
||||
Check.ExceptionEasy(true,ex.Message, "SSL出错,因为升级了驱动,字符串增加Encrypt=True;TrustServerCertificate=True;即可。详细错误:" + ex.Message);
|
||||
}
|
||||
Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message+$"DbType=\"{this.Context.CurrentConnectionConfig.DbType}\";ConfigId=\"{this.Context.CurrentConnectionConfig.ConfigId}\"");
|
||||
}
|
||||
}
|
||||
|
@ -435,6 +435,10 @@ namespace SqlSugar
|
||||
{
|
||||
result = "DateTime.Now";
|
||||
}
|
||||
if (result.Equals("getdate()", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
result = "DateTime.Now";
|
||||
}
|
||||
result = result.Replace("\r", "\t").Replace("\n", "\t");
|
||||
result = result.IsIn("''", "\"\"") ? string.Empty : result;
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user