/// <summary>
/// Execute SQL Command,Return single Result.
/// </summary>
/// <param>SQL Command collection which will be Executed</param>
/// <param>SQL Parameters Collection</param>
/// <returns>return single Result</returns>
public object ExecScalar(string strSql, SqlParameter[] sqlParameters)
{
debug("Now Execute DataBaseAccess's Method:ExecScalar(string,SqlParameter[]),Return Type:object ");
return ExecScalar(SQLHelper.CreateCommand(strSql, sqlParameters, this.conn));
}
#endregion
#region ExecScalarEx
/// <summary>
/// Execute SQL command,if result set has note return 1,if result set is null return 0
/// </summary>
/// <param>SQL Command which will be Executed</param>
/// <returns>Execute SQL command,if result set has note return 1,if result set is null return 0</returns>
public int ExecScalarEx(SqlCommand sqlcmd)
{
debug("Now Execute DataBaseAccess's Method:ExecScalarEx(SqlCommand),Return Type:int ");
sqlcmd.Connection = this.conn;
try
{
debug("Execute SQL Command:" + sqlcmd.CommandText);
this.conn.Open();
SqlDataReader myDr = sqlcmd.ExecuteReader(CommandBehavior.CloseConnection);