Exemplo n.º 1
0
        public static DataSet Query(string dbKey, string SQLString, int Times)
        {
            MyDbConnection2 conn = null;

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

                return(conn.Query(SQLString, Times));
            }
            finally
            {
                PushDBConnection(conn);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 执行查询语句,返回DataSet
        /// </summary>
        /// <param name="SQLString">查询语句</param>
        /// <returns>DataSet</returns>
        public static DataSet Query(string dbKey, string SQLString, params MySqlParameter[] cmdParms)
        {
            MyDbConnection2 conn = null;

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

                return(conn.Query(SQLString, cmdParms));
            }
            finally
            {
                PushDBConnection(conn);
            }
        }
Exemplo n.º 3
0
        public static DataSet Query(string dbKey, string SQLString, params MySqlParameter[] cmdParms)
        {
            MyDbConnection2 conn = null;
            DataSet         result;

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