protected override void RegisterParameter(selectparam p)
        {
            if (ParameterAlreadyThere(p))
            {
                return;                           /* [dlatikay 20080711] support when the same parameter occurs multiple times in the same statement, which is perfectly valid */
            }
            MySqlDbType type = TranslateType(p.ParamType);

            if (p.ParamSize > 0)
            {
                local_parameters.Add(new MySqlParameter(p.ParamName, type, p.ParamSize));
            }
            else
            {
                if (type == MySqlDbType.Binary)
                {
                    var pa = new MySqlParameter(p.ParamName, type, 16);
                    pa.DbType = DbType.Binary;
                    local_parameters.Add(pa); /* [dlatikay 20110923] this is the GUID, bugfix for MySql which wrongly makes it AnsiString at first */
                }
                else if (type == MySqlDbType.LongText)
                {
                    var pa = new MySqlParameter(p.ParamName, type, 16);
                    pa.DbType = DbType.String;
                    local_parameters.Add(pa); /* [dlatikay 20110926] this is the memo (MySQL: "LongString"), bugfix for MySql which wrongly makes it AnsiString at first */
                }
                else
                {
                    local_parameters.Add(new MySqlParameter(p.ParamName, type));
                }
            }
        }
Esempio n. 2
0
        protected override void RegisterParameter(selectparam p)
        {
            if (ParameterAlreadyThere(p))
            {
                return;                           /* [dlatikay 20080711] support when the same parameter occurs multiple times in the same statement, which is perfectly valid */
            }
            OracleDbType type = TranslateType(p.ParamType);

            if (p.ParamSize > 0)
            {
                local_parameters.Add(new OracleParameter(p.ParamName, type, p.ParamSize));
            }
            else
            {
                local_parameters.Add(new OracleParameter(p.ParamName, type));
            }
        }
Esempio n. 3
0
 public param(selectparam parm)
 {
     field = parm;
 }