Beispiel #1
0
 public DataParam(string name, CustomSqlTypes type, ParamDirection direction, string defval)
 {
     Name      = name;
     Type      = type;
     Default   = defval;
     Direction = direction;
 }
Beispiel #2
0
        public static SqlDbType DetermineSqlDbTYpe(CustomSqlTypes type)
        {
            switch (type)
            {
            case CustomSqlTypes.Int:
                return(SqlDbType.Int);

            case CustomSqlTypes.Long:
                return(SqlDbType.BigInt);

            case CustomSqlTypes.String:
                return(SqlDbType.NVarChar);

            case CustomSqlTypes.Datetime:
                return(SqlDbType.DateTime);

            case CustomSqlTypes.Double:
                return(SqlDbType.Decimal);

            case CustomSqlTypes.Money:
                return(SqlDbType.Money);

            case CustomSqlTypes.SmallInt:
                return(SqlDbType.SmallInt);

            case CustomSqlTypes.Char:
                return(SqlDbType.NChar);

            case CustomSqlTypes.Real:
                return(SqlDbType.Real);

            default:
                return(SqlDbType.NVarChar);
            }
        }
 public void AddReturnParam(CustomSqlTypes returntype)
 {
     AddParam(new DataParam("@return", returntype, ParamDirection.Return, "-1"));
 }
Beispiel #4
0
 public DataParam(string name, CustomSqlTypes type) : this(name, type, ParamDirection.Input)
 {
 }
Beispiel #5
0
 public DataParam(string name, CustomSqlTypes type, ParamDirection direction)
     : this(name, type, direction, string.Empty)
 {
 }