SVN r1161
SVN-Revision: r1161
This commit is contained in:
@@ -43,6 +43,12 @@ namespace Lskj.Core
|
||||
/// 请求超时时间
|
||||
/// </summary>
|
||||
public static int CommandTimeout;
|
||||
|
||||
/// <summary>
|
||||
/// 上一次失败的sql
|
||||
/// </summary>
|
||||
public static string LastFailureSql;
|
||||
|
||||
/// <summary>
|
||||
/// <para>说明:是否已经连接数据库</para>
|
||||
/// <para>创建者:朗速科技有限公司</para>
|
||||
@@ -251,6 +257,7 @@ namespace Lskj.Core
|
||||
/// <returns>DataSet.</returns>
|
||||
public static DataSet ExecuteDataSet(CommandType cmdType, string cmdText, string tabName, params DbParameter[] commandParameters)
|
||||
{
|
||||
LastFailureSql = string.Empty;
|
||||
DataSet set2;
|
||||
DbCommand cmd = dbFactory.CreateCommand();
|
||||
try
|
||||
@@ -276,8 +283,10 @@ namespace Lskj.Core
|
||||
sqlParameter.Value = resultTable.Rows[0][$"outputValue{i}"];
|
||||
}
|
||||
}
|
||||
if (returnValue + "" == "-1") LastFailureSql = cmd.CommandText;
|
||||
}
|
||||
//adapter.FillSchema(dataSet, SchemaType.Mapped, tabName);
|
||||
|
||||
set2 = dataSet;
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -339,6 +348,7 @@ namespace Lskj.Core
|
||||
/// <returns>DataSet.</returns>
|
||||
public static DataSet ExecuteDataSet(string procedureName, string tabName, string[] parameterNames, DbParameter[] parameterValues)
|
||||
{
|
||||
LastFailureSql = string.Empty;
|
||||
DataSet set2;
|
||||
try
|
||||
{
|
||||
@@ -375,6 +385,7 @@ namespace Lskj.Core
|
||||
sqlParameter.Value = resultTable.Rows[0][$"outputValue{i}"];
|
||||
}
|
||||
}
|
||||
if (returnValue + "" == "-1") LastFailureSql = cmd.CommandText;
|
||||
}
|
||||
set2 = dataSet;
|
||||
}
|
||||
@@ -398,6 +409,7 @@ namespace Lskj.Core
|
||||
/// <returns>System.Int32.</returns>
|
||||
public static int ExecuteNonQuery(CommandType cmdType, string cmdText, params DbParameter[] commandParameters)
|
||||
{
|
||||
LastFailureSql = string.Empty;
|
||||
DbCommand cmd = dbFactory.CreateCommand();
|
||||
int num = 0;
|
||||
try
|
||||
@@ -428,6 +440,7 @@ namespace Lskj.Core
|
||||
sqlParameter.Value = resultTable.Rows[0][$"outputValue{i}"];
|
||||
}
|
||||
}
|
||||
if (returnValue + "" == "-1") LastFailureSql = cmd.CommandText;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -476,6 +489,7 @@ namespace Lskj.Core
|
||||
/// <returns></returns>
|
||||
public static int ExecuteNonQuery(CommandType cmdType, string cmdText, DbTransaction Trans, int a, params DbParameter[] commandParameters)
|
||||
{
|
||||
LastFailureSql = string.Empty;
|
||||
DbCommand cmd = dbFactory.CreateCommand();
|
||||
int num = 0;
|
||||
try
|
||||
@@ -506,6 +520,7 @@ namespace Lskj.Core
|
||||
sqlParameter.Value = resultTable.Rows[0][$"outputValue{i}"];
|
||||
}
|
||||
}
|
||||
if (returnValue + "" == "-1") LastFailureSql = cmd.CommandText;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -746,7 +761,7 @@ namespace Lskj.Core
|
||||
/// <param name="cmdType">Type of the command.</param>
|
||||
/// <param name="cmdText">The command text.</param>
|
||||
/// <param name="cmdParms">The command parms.</param>
|
||||
private static void PrepareCommand(DbCommand cmd, DbConnection Connection, DbTransaction trans, CommandType cmdType, string cmdText, DbParameter[] cmdParms)
|
||||
public static void PrepareCommand(DbCommand cmd, DbConnection Connection, DbTransaction trans, CommandType cmdType, string cmdText, DbParameter[] cmdParms)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user