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

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    conn.ExecuteSqlTranWithIndentity(SQLStringList);
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
        }
Example #2
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);
        }
Example #3
0
        public static int ExecuteSqlInsertImg(string dbKey, string strSQL, List <Tuple <string, byte[]> > imgList)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.ExecuteSqlInsertImg(strSQL, imgList));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(-1);
        }
Example #4
0
        public static object ExecuteSqlGet(string dbKey, string SQLString, string content)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null == conn)
                {
                    return(conn.ExecuteSqlGet(SQLString, content));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(null);
        }
Example #5
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 #6
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 #7
0
        public static int ExecuteSqlByTime(string dbKey, string SQLString, int Times)
        {
            MyDbConnection2 conn = null;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null != conn)
                {
                    return(conn.ExecuteNonQuery(SQLString, Times));
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(-1);
        }
Example #8
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);
        }
Example #9
0
        public static MySqlDataReader ExecuteReader(string dbKey, string SQLString, params MySqlParameter[] cmdParms)
        {
            MyDbConnection2 conn = null;
            MySqlDataReader result;

            try
            {
                conn = DbHelperMySQL3.PopDBConnection(dbKey);
                if (null == conn)
                {
                    result = null;
                }
                else
                {
                    result = conn.ExecuteReader(SQLString, cmdParms);
                }
            }
            finally
            {
                DbHelperMySQL3.PushDBConnection(conn);
            }
            return(result);
        }
Example #10
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);
        }
Example #11
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);
        }