public DataParam(string name, CustomSqlTypes type, ParamDirection direction, string defval) { Name = name; Type = type; Default = defval; Direction = direction; }
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")); }
public DataParam(string name, CustomSqlTypes type) : this(name, type, ParamDirection.Input) { }
public DataParam(string name, CustomSqlTypes type, ParamDirection direction) : this(name, type, direction, string.Empty) { }