From 7572bad78d29347aa425ab4e8878490364c59d9e Mon Sep 17 00:00:00 2001 From: tdx Date: Tue, 24 Feb 2026 03:21:50 +0000 Subject: [PATCH] SVN r1119 SVN-Revision: r1119 --- 插件库/Lskj.Core/SqlHelper.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/插件库/Lskj.Core/SqlHelper.cs b/插件库/Lskj.Core/SqlHelper.cs index 0b1e4a4..3e01f0d 100644 --- a/插件库/Lskj.Core/SqlHelper.cs +++ b/插件库/Lskj.Core/SqlHelper.cs @@ -260,7 +260,7 @@ namespace Lskj.Core adapter.SelectCommand = cmd;//创建对象,与sql命令对象绑定 DataSet dataSet = new DataSet(); adapter.Fill(dataSet, tabName);//填充数据。第二个参数是数据集中内存表的名字,可以与数据库中的不同 - if (dataSet.Tables.Count > 0 && commandParameters != null) + if (dataSet.Tables.Count > 0 && commandParameters != null && connectionType == ConnectionType.DmServer) { DataTable resultTable = dataSet.Tables[dataSet.Tables.Count - 1]; object returnValue = resultTable.Columns.Contains("returnValue") ? resultTable.Rows[0]["returnValue"] : ""; @@ -359,7 +359,7 @@ namespace Lskj.Core adapter.SelectCommand = cmd; DataSet dataSet = new DataSet(); adapter.Fill(dataSet, tabName); - if (dataSet.Tables.Count > 0 && parameterValues != null) + if (dataSet.Tables.Count > 0 && parameterValues != null && connectionType == ConnectionType.DmServer) { DataTable resultTable = dataSet.Tables[dataSet.Tables.Count - 1]; object returnValue = resultTable.Columns.Contains("returnValue") ? resultTable.Rows[0]["returnValue"] : ""; @@ -411,7 +411,7 @@ namespace Lskj.Core adapter.SelectCommand = cmd; DataSet dataSet = new DataSet(); adapter.Fill(dataSet); - if (dataSet.Tables.Count > 0 && commandParameters != null) + if (dataSet.Tables.Count > 0 && commandParameters != null && connectionType == ConnectionType.DmServer) { DataTable resultTable = dataSet.Tables[dataSet.Tables.Count - 1]; int.TryParse(resultTable.Rows[0]["execcount"] + "", out num); @@ -423,7 +423,7 @@ namespace Lskj.Core { sqlParameter.Value = returnValue; } - if (sqlParameter.Direction == ParameterDirection.Output) + if (sqlParameter.Direction == ParameterDirection.Output || sqlParameter.Direction == ParameterDirection.InputOutput) { sqlParameter.Value = resultTable.Rows[0][$"outputValue{i}"]; } @@ -489,7 +489,7 @@ namespace Lskj.Core adapter.SelectCommand = cmd; DataSet dataSet = new DataSet(); adapter.Fill(dataSet); - if (dataSet.Tables.Count > 0 && commandParameters != null) + if (dataSet.Tables.Count > 0 && commandParameters != null && connectionType == ConnectionType.DmServer) { DataTable resultTable = dataSet.Tables[dataSet.Tables.Count - 1]; int.TryParse(resultTable.Rows[0]["execcount"] + "", out num); @@ -804,7 +804,7 @@ namespace Lskj.Core continue; } string value = (parameter.Value + "").Replace("'", "''"); - if (parameter.Direction == ParameterDirection.Output) + if (parameter.Direction == ParameterDirection.Output || parameter.Direction == ParameterDirection.InputOutput) { if (connectionType == ConnectionType.KdbnServer) {