cs/access.cs

(开头部分) 4KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Caching;
using System.Data.OleDb;
using System.Data;

    /// <summary>
    /// 带缓存的数据库链接方法 
    /// </summary>
    public class access
    {
        private HttpContext context = HttpContext.Current;

        public int ExecuteNonQuery(string sql) 
        {
            int fig = 0;

            fig = new AcsHelper().ExecuteNonQuery(sql);

            return fig;
        }
        public int ExecuteNonQuery(string sql, OleDbParameter[] parameters)
        {
            int fig = 0;

            fig = new AcsHelper().ExecuteNonQuery(sql, parameters);

            return fig;
        }

        public string ExecuteScalar(string sql) 
        {
            object fig = null;

            if (iftj() == 1)
            {
                if (context.Cache[sql] == null)
                {
                    string a = new AcsHelper().ExecuteScalar(sql);
                    if (a != "")
                    {
                        context.Cache.Insert(sql, a, null, times(), Cache.NoSlidingExpiration);
                    }
                    fig = a;
                }
                else
                {
                    fig = context.Cache[sql];
                }
            }
            else
            {
                fig = new AcsHelper().ExecuteScalar(sql);
            }

            return Convert.ToString(fig);
        }
        public string ExecuteScalar(string sql, OleDbParameter[] parameters)
        {
后面还有 93 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。