Ejemplo n.º 1
0
        public static object GetSingle(string dbKey, string SQLString, int Times)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.GetSingle(SQLString, Times, new MySqlParameter[0]));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 执行一条计算查询结果语句,返回查询结果(object)。
        /// </summary>
        /// <param name="SQLString">计算查询结果语句</param>
        /// <returns>查询结果(object)</returns>
        public static object GetSingle(string dbKey, string SQLString, params MySqlParameter[] cmdParms)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = PopDBConnection(dbKey);
                if (null == conn)
                {
                    return(-1);
                }

                return(conn.GetSingle(SQLString, 0, cmdParms));
            }
            finally
            {
                PushDBConnection(conn);
            }
        }
Ejemplo n.º 3
0
        public static object GetSingle(string dbKey, string SQLString, int Times)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.GetSingle(SQLString, Times));
                }
            }
            finally
            {
                PushDBConnection(conn);
            }

            return(null);
        }
Ejemplo n.º 4
0
        public static object GetSingle(string dbKey, string SQLString, params MySqlParameter[] cmdParms)
        {
            MyDbConnection2 conn = null;
            object          result;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null == conn)
                {
                    result = -1;
                }
                else
                {
                    result = conn.GetSingle(SQLString, 0, cmdParms);
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(result);
        }