Exemple #1
0
        override public object GetValue(DbParameter p)
        {
            object value = p.Value;

            if (value == DBNull.Value)
            {
                return(value);
            }
            if (p.DbType == DbType.Boolean)
            {
                return(1 == Convert.ToInt32(value));
            }
            if (p.GetRuntimeEnumProperty("MySqlType") == "Bit")
            {
                return(1 == Convert.ToInt32(value));
            }
            if (p.GetRuntimeEnumProperty("MySqlType") == "TinyInt")
            {
                return(Convert.ToSByte(value));
            }
            return(value);
        }
Exemple #2
0
 override public bool IsCursor(DbParameter p)
 {
     return(p.GetRuntimeEnumProperty("OracleDbType") == "RefCursor");
 }