private ISqlString ToString(SqlDateTime date, SqlCharacterType destType) { var dateString = ToSqlString(date); var s = new SqlString(dateString); return((ISqlString)destType.NormalizeValue(s)); }
private ISqlValue ToString(SqlNumber number, SqlCharacterType destType) { if (destType.HasMaxSize && number.Precision > destType.MaxSize) { return(SqlNull.Value); } var s = number.ToString(); return(destType.NormalizeValue(new SqlString(s))); }
private ISqlValue ToString(ISqlBinary binary, SqlCharacterType destType) { if (binary == null) { throw new InvalidCastException(); } var bytes = binary.ToArray(); var s = new SqlString(bytes); return(destType.NormalizeValue(s)); }
private ISqlString ToString(SqlBoolean value, SqlCharacterType destType) { var s = new SqlString(ToSqlString(value)); return((ISqlString)destType.NormalizeValue(s)); }
private ISqlValue ToString(SqlDayToSecond dts, SqlCharacterType destType) { var s = new SqlString(dts.ToString()); return(destType.NormalizeValue(s)); }