/// <summary>
        /// 依据参数生成一个命令对像
        /// </summary>
        /// <param name="SQLstring">查询语句或存储过程名</param>
        /// <param name="CommandType">指示本语句是查询语句还是存储过程</param>
        /// <param name="SqlParams">参数各清单,第一列是参数名,第二列是参数类型,第三列是列字长,第四列是数据源列名,第五列是返回还是输入还是其它</param>
        /// <returns></returns>
        private MySqlCommand CreateCommand(string SQLstring, CommandType CommandType, string[,] SqlParams)
        {
            myDBConvert = new TypeConvert();
            MySqlCommand cmd = new MySqlCommand();

            cmd.Connection = this.conn;
            if (inTransaction)
            {
                cmd.Transaction = trans;
            }
            cmd.CommandType = CommandType;
            cmd.CommandText = SQLstring;
            if (SqlParams != null)
            {
                int length = SqlParams.GetLength(0);
                for (int i = 0; i < length; i++)
                {
                    if (SqlParams[i, 2] == "")
                    {
                        cmd.Parameters.Add(SqlParams[i, 0], myDBConvert.ConvertSqlDB(SqlParams[i, 1]));
                    }
                    else
                    {
                        cmd.Parameters.Add(SqlParams[i, 0], myDBConvert.ConvertMySqlDB(SqlParams[i, 1]), int.Parse(SqlParams[i, 2]), SqlParams[i, 3]);
                    }
                }
            }

            return(cmd);
        }
        /// <summary>
        /// 依据参数生成一个命令对像
        /// </summary>
        /// <param name="SQLstring">查询语句或存储过程名</param>
        /// <param name="CommandType">指示本语句是查询语句还是存储过程</param>
        /// <param name="SqlParams">参数各清单,第一列是参数名,第二列是参数类型,第三列是列字长,第四列是数据源列名,第五列是返回还是输入还是其它</param>
        /// <param name="values">参数的值</param>
        /// <returns></returns>
        private MySqlCommand CreateCommand(string SQLstring, CommandType CommandType, string[,] SqlParams, object[] values)
        {
            myDBConvert = new TypeConvert();
            MySqlCommand cmd = new MySqlCommand();

            cmd.Connection = this.conn;
            if (inTransaction)
            {
                cmd.Transaction = trans;
            }
            if ((SqlParams != null) && (SqlParams.GetLength(0) != values.Length))
            {
                throw new Exception("查询的参数与参数值的数量不一致!");
            }
            cmd.CommandType = CommandType;
            cmd.CommandText = SQLstring;
            if (SqlParams != null && values != null)
            {
                int length = SqlParams.GetLength(0);
                for (int i = 0; i < length; i++)
                {
                    if (SqlParams[i, 2] == "")
                    {
                        cmd.Parameters.Add(SqlParams[i, 0], myDBConvert.ConvertSqlDB(SqlParams[i, 1]));
                    }
                    else
                    {
                        cmd.Parameters.Add(SqlParams[i, 0], myDBConvert.ConvertMySqlDB(SqlParams[i, 1]), int.Parse(SqlParams[i, 2]),
                                           (SqlParams[i, 3] == ""?SqlParams[i, 0].Replace("@", ""):SqlParams[i, 3]));
                    }

                    if (SqlParams[i, 4] == "Output")
                    {
                        cmd.Parameters[SqlParams[i, 0]].Direction = ParameterDirection.Output;
                    }
                    else
                    {
                        cmd.Parameters[SqlParams[i, 0]].Value = values[i];
                    }
                }
            }
            return(cmd);
        }