Example #1
0
        public static void ExecuteSqlTran(string dbKey, Hashtable SQLStringList)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    conn.ExecuteSqlTran(SQLStringList);
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
        }
Example #2
0
        public static int ExecuteSqlTran(string dbKey, List <string> SQLStringList)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.ExecuteSqlTran(SQLStringList));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(0);
        }
Example #3
0
        public static int ExecuteSqlTran(string dbKey, List <CommandInfo> list, List <CommandInfo> oracleCmdSqlList)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.ExecuteSqlTran(list, oracleCmdSqlList));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(0);
        }
Example #4
0
        /// <summary>
        /// 执行多条SQL语句,实现数据库事务。
        /// </summary>
        /// <param name="SQLStringList">SQL语句的哈希表(key为sql语句,value是该语句的MySqlParameter[])</param>
        public static int ExecuteSqlTran(string dbKey, System.Collections.Generic.List <CommandInfo> cmdList)
        {
            MyDbConnection2 conn = null;

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

                return(conn.ExecuteSqlTran(cmdList));
            }
            finally
            {
                PushDBConnection(conn);
            }
        }
Example #5
0
        /// <summary>
        /// 执行多条SQL语句,实现数据库事务。
        /// </summary>
        /// <param name="SQLStringList">SQL语句的哈希表(key为sql语句,value是该语句的MySqlParameter[])</param>
        public static void ExecuteSqlTran(string dbKey, Hashtable SQLStringList)
        {
            MyDbConnection2 conn = null;

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

                conn.ExecuteSqlTran(SQLStringList);
            }
            finally
            {
                PushDBConnection(conn);
            }
        }
Example #6
0
        public static int ExecuteSqlTran(string dbKey, List <CommandInfo> cmdList)
        {
            MyDbConnection2 conn = null;
            int             result;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null == conn)
                {
                    result = -1;
                }
                else
                {
                    result = conn.ExecuteSqlTran(cmdList);
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(result);
        }