Пример #1
0
    /// <summary>
    /// 快速执行一不带参数的存储过程
    /// </summary>
    /// <param name="strStoredProcedureName">存储过程名称</param>
    /// <returns>存储过程执行后受影响的行数</returns>
    public static int ExecuteStoredProcedure(string strStoredProcedureName)
    {
        DbCore dbCore = null;

        try
        {
            dbCore = new DbCore(GetDatabaseType(), GetConnectionString());
            dbCore.Open();
            return(dbCore.ExecuteStoredProcedure(strStoredProcedureName));
        }
        catch (Exception ex)
        {
            throw ex;
        }
        finally
        {
            if (dbCore != null)
            {
                dbCore.Close();
            }
        }
    }