Checking in latest SDALEO changes optimizing Advantage really only.
This commit is contained in:
75
DB.cs
75
DB.cs
@@ -54,12 +54,22 @@ namespace Sdaleo
|
||||
|
||||
#region NonQuery
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the ExecuteNonQuery() Command Object
|
||||
/// </summary>
|
||||
/// <param name="SqlCommandText">SQL Text/Commands to execute</param>
|
||||
/// <returns>the result of the ExecuteNonQuery() operation</returns>
|
||||
public DBRetVal ExecuteNonQuery(string SqlCommandText)
|
||||
{
|
||||
return ExecuteNonQuery(SqlCommandText, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the ExecuteNonQuery() Command Object
|
||||
/// </summary>
|
||||
/// <param name="SqlCommandText">SQL Text/Commands to execute</param>
|
||||
/// <returns>the result of the ExecuteNonQuery() operation</returns>
|
||||
public DBRetVal ExecuteNonQuery(string SqlCommandText, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -70,6 +80,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlCommandText;
|
||||
cmd.CommandType = type;
|
||||
if(_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int) _ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
int nRows = cmd.ExecuteNonQuery();
|
||||
@@ -91,6 +102,17 @@ namespace Sdaleo
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the ExecuteNonQuery() operation</returns>
|
||||
public DBRetVal ExecuteNonQuery(string SqlCommandText, DBMSIndParameter[] parameters)
|
||||
{
|
||||
return ExecuteNonQuery(SqlCommandText, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the ExecuteNonQuery() Command Object
|
||||
/// </summary>
|
||||
/// <param name="SqlCommandText">SQL Text/Commands to execute</param>
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the ExecuteNonQuery() operation</returns>
|
||||
public DBRetVal ExecuteNonQuery(string SqlCommandText, DBMSIndParameter[] parameters, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -101,6 +123,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlCommandText;
|
||||
cmd.CommandType = type;
|
||||
if (_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int)_ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
|
||||
@@ -130,6 +153,16 @@ namespace Sdaleo
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <returns>the result of the ExecuteScalar() operation</returns>
|
||||
public DBRetVal ExecuteScalar(string SqlText)
|
||||
{
|
||||
return ExecuteScalar(SqlText, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the ExecuteScalar() Command Object
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <returns>the result of the ExecuteScalar() operation</returns>
|
||||
public DBRetVal ExecuteScalar(string SqlText, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -140,6 +173,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlText;
|
||||
cmd.CommandType = type;
|
||||
if (_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int)_ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
object oResult = cmd.ExecuteScalar();
|
||||
@@ -161,6 +195,17 @@ namespace Sdaleo
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the ExecuteScalar() operation</returns>
|
||||
public DBRetVal ExecuteScalar(string SqlText, DBMSIndParameter[] parameters)
|
||||
{
|
||||
return ExecuteScalar(SqlText, parameters, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the ExecuteScalar() Command Object
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the ExecuteScalar() operation</returns>
|
||||
public DBRetVal ExecuteScalar(string SqlText, DBMSIndParameter[] parameters, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -171,6 +216,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlText;
|
||||
cmd.CommandType = type;
|
||||
if (_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int)_ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
|
||||
@@ -194,12 +240,22 @@ namespace Sdaleo
|
||||
|
||||
#region DataTable
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the DataAdapter Fill()
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <returns>the result of the DataAdapter Fill() operation</returns>
|
||||
public DBRetVal FillDataTable(string SqlText)
|
||||
{
|
||||
return FillDataTable(SqlText, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the DataAdapter Fill()
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <returns>the result of the DataAdapter Fill() operation</returns>
|
||||
public DBRetVal FillDataTable(string SqlText, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -210,6 +266,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlText;
|
||||
cmd.CommandType = type;
|
||||
if (_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int)_ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
|
||||
@@ -229,13 +286,24 @@ namespace Sdaleo
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the DataAdapter Fill()
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the DataAdapter Fill() operation</returns>
|
||||
public DBRetVal FillDataTable(string SqlText, DBMSIndParameter[] parameters)
|
||||
{
|
||||
return FillDataTable(SqlText, parameters, CommandType.Text);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use this to Run SQL with the DataAdapter Fill()
|
||||
/// </summary>
|
||||
/// <param name="SqlText">SQL Text to execute</param>
|
||||
/// <param name="parameters">Allows the use of DBMS Independent parameters</param>
|
||||
/// <returns>the result of the DataAdapter Fill() operation</returns>
|
||||
public DBRetVal FillDataTable(string SqlText, DBMSIndParameter[] parameters, CommandType type)
|
||||
{
|
||||
DBRetVal retVal = new DBRetVal();
|
||||
try
|
||||
@@ -246,6 +314,7 @@ namespace Sdaleo
|
||||
using (DbCommand cmd = conn.CreateCommand())
|
||||
{
|
||||
cmd.CommandText = SqlText;
|
||||
cmd.CommandType = type;
|
||||
if (_ConnectionStrObj.SupportsTimeouts)
|
||||
cmd.CommandTimeout = (int)_ConnectionStrObj.Timeouts.CommandTimeout;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user