Browse Source

Update Oracle

pull/18/head
sunkaixuan 3 years ago
parent
commit
3594e31056
  1. 4
      Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs

4
Src/Asp.Net/SqlSugar/Realization/Oracle/OracleProvider.cs

@ -122,6 +122,10 @@ namespace SqlSugar
var isVarchar = this.Context.IsVarchar();
foreach (var parameter in parameters)
{
if (parameter.ParameterName.ToLower().IsIn("@user", "@level", "@key", ":user", ":level", ":key"))
{
Check.ExceptionEasy($"{parameter.ParameterName.Replace(":","@")} key word", $"参数名{parameter.ParameterName.Replace(":", "@")}是关键字 ,在ORACLE中例如 {parameter.ParameterName.Replace(":", "@")} 无法定义成参数 ,你可以用AOP替换参数名");
}
if (parameter.Value == null) parameter.Value = DBNull.Value;
var sqlParameter = new OracleParameter();
sqlParameter.Size = parameter.Size == -1 ? 0 : parameter.Size;

Loading…
Cancel
Save