/// <summary> /// Executes a stored procedure and returns the first column of the first row in resultset /// </summary> public static int ExecuteScalar(string storedProcedureName, Hashtable param, int timeout = 0) { DataAccessObject dao = new DataAccessObject(); if (timeout > 0) { dao.TimeOutSeconds = timeout; } return(dao.ExecuteNonQueryFromSproc(storedProcedureName, param, string.Empty, true)); }
/// <summary> /// Executes a stored procedure and returns the first column of the first row in resultset /// </summary> public static int ExecuteScalar(string storedProcedureName, Hashtable param, int timeout = 0) { DataAccessObject dao = new DataAccessObject(); if (timeout > 0) { dao.TimeOutSeconds = timeout; } return dao.ExecuteNonQueryFromSproc(storedProcedureName, param, string.Empty, true); }
/// <summary> /// Executes a stored procedure and returns the first column of the first row in result set when idParam is provided. /// </summary> /// <param name="storedProcedureName">the name of the stored procedure to be executed</param> /// <param name="idParam">name of the ID field for sprocs that return an incremental ID as integer</param> /// <param name="param">a Hashtable list of parameters and values required by the stored procedure.</param> public static int ExecuteNonQuery(string storedProcedureName, Hashtable param, string idParam) { DataAccessObject dao = new DataAccessObject(); return dao.ExecuteNonQueryFromSproc(storedProcedureName, param, idParam, false); }
/// <summary> /// Executes a stored procedure and returns the first column of the first row in result set when idParam is provided. /// </summary> /// <param name="storedProcedureName">the name of the stored procedure to be executed</param> /// <param name="idParam">name of the ID field for sprocs that return an incremental ID as integer</param> /// <param name="param">a Hashtable list of parameters and values required by the stored procedure.</param> public static int ExecuteNonQuery(string storedProcedureName, Hashtable param, string idParam) { DataAccessObject dao = new DataAccessObject(); return(dao.ExecuteNonQueryFromSproc(storedProcedureName, param, idParam, false)); }