I thought about the problem some more and amended the TimeAsTimeSpanType 
Set method to the following:

public override void Set(IDbCommand st, object value, int index)
{
    if (((IDataParameter)st.Parameters[index]).DbType == DbType.DateTime)
    {
        DateTime date = BaseDateValue.AddTicks(((TimeSpan)value).Ticks);
        ((IDataParameter)st.Parameters[index]).Value = date;
    }
    else
    {
        ((IDataParameter)st.Parameters[index]).Value = value;
    }
}

This works for both Sql Server and Sybase ADS. Should I create a JIRA issue 
for this?

Thanks
Michael

Reply via email to