mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-07-15 14:04:44 +08:00
Oracle output cursor bug
This commit is contained in:
parent
67358ab9ab
commit
f524c73ae2
@ -185,6 +185,13 @@ namespace OrmTest.Demo
|
||||
private static void Ado()
|
||||
{
|
||||
var db = GetInstance();
|
||||
|
||||
|
||||
string spName = "PR_TEST";
|
||||
var p1 = new SugarParameter("@O_RESULT", null, true);
|
||||
p1.IsRefCursor = true;
|
||||
var dt3 = db.Ado.UseStoredProcedure().GetDataTable(spName, p1);
|
||||
|
||||
db.Ado.BeginTran();
|
||||
var t1 = db.Ado.SqlQuery<string>("select 'a' from dual");
|
||||
var t2 = db.Ado.GetInt("select 1 from dual");
|
||||
|
@ -655,7 +655,10 @@ namespace SqlSugar
|
||||
{
|
||||
foreach (var outputParameter in parameters.Where(it => it.Direction.IsIn(ParameterDirection.Output, ParameterDirection.InputOutput,ParameterDirection.ReturnValue)))
|
||||
{
|
||||
var gobalOutputParamter = this.OutputParameters.Single(it => it.ParameterName == outputParameter.ParameterName);
|
||||
var gobalOutputParamter = this.OutputParameters.FirstOrDefault(it => it.ParameterName == outputParameter.ParameterName);
|
||||
if (gobalOutputParamter == null) {//Oracle bug
|
||||
gobalOutputParamter=this.OutputParameters.FirstOrDefault(it => it.ParameterName == outputParameter.ParameterName.TrimStart(outputParameter.ParameterName.First()));
|
||||
}
|
||||
outputParameter.Value = gobalOutputParamter.Value;
|
||||
this.OutputParameters.Remove(gobalOutputParamter);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user