public RecordAsMFNodeAdapter(IDataReader reader) { for (int i = 0; i != reader.FieldCount; ++i) { if (reader.GetDataTypeName(i).ToLower() == "xml") { long l = reader.GetBytes(i, 0, null, 0, 0); byte[] b = new byte[l]; try { reader.GetBytes(i, 0, b, 0, (int)l); } catch (System.InvalidCastException x) { // Workaround for DB2 NULL values in XML. continue; } dictionary.Add(reader.GetName(i), b); } else { if (!reader.IsDBNull(i)) { object value = reader.GetValue(i); // promote datetimes if (value is DateTime) { value = new Altova.Types.DateTime((DateTime)value); } dictionary.Add(reader.GetName(i), value); } } } }
public static void SetValue(XmlNode node, MemberInfo member, Altova.Types.DateTime b) { SetValue(node, member, GetFormatter(member).Format(b)); }
public static void SetParameter(IDataParameter target, Altova.Types.DateTime value) { target.Value = value.Value; }
public static void SetValue(RecordBuffer buffer, MemberInfo member, Altova.Types.DateTime value) { buffer.Set(member.LocalName, value.Value); }
public static Altova.Types.DateTime CastToDateTime(Altova.Types.DateTime s, Altova.Types.DateTimeFormat format) { return(s); }
/* * public static Altova.Types.YearMonthDuration CastToYearMonthDuration(string s) * { * return Altova.Types.YearMonthDuration.Parse(s); * } * * public static Altova.Types.DayTimeDuration CastToDayTimeDuration(string s) * { * return Altova.Types.DayTimeDuration.Parse(s); * } */ public static Altova.Types.DateTime CastToDateTime(Altova.Types.DateTime s) { return(s); }
public static string CastToString(Altova.Types.DateTime dt, Altova.Types.DateTimeFormat format) { return(dt.ToString(format)); }
public static string CastToString(Altova.Types.DateTime dt) { return(dt.ToString()); }
public static DbParam ToDBType(Altova.Types.DateTime dt, DbType type) { return(new DbParam(dt.Value, type, 0)); }