Fabio,

Sorry it's been a while - I've been away and distracted.

I'm not sure what your JIRA means (do I have to do anything special to
use min dates?) but this version of your test case works fine:

using (var tx = sqlConnection.BeginTransaction())
{
        var command = sqlConnection.CreateCommand();
        command.Transaction = tx;
        command.CommandText = "INSERT INTO TryDate([MyDate]) VALUES(@p0)";
        var dateParam = command.CreateParameter();
        dateParam.ParameterName = "@p0";
        dateParam.SqlDbType = SqlDbType.Date;
        //dateParam.DbType = DbType.Date;
        dateParam.Value = DateTime.MinValue.Date;
        command.Parameters.Add(dateParam);
        command.ExecuteNonQuery();
        tx.Commit();
}

I'm guessing though that the code that does the insert is not dialect
specific code... therefore is using the SqlDbType not acceptable?

Reply via email to