Skip to content

Commit

Permalink
Merge pull request migratordotnet#5 from Schlupp77/master
Browse files Browse the repository at this point in the history
Completed Change for MSSQL for UInt16, UInt32 and UInt64
  • Loading branch information
jogibear9988 committed Oct 24, 2013
2 parents 5b62e45 + c2f79c1 commit e450cd0
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,5 +434,28 @@ protected override string GetPrimaryKeyConstraintName(string table)
return reader.Read() ? reader.GetString(0) : null;
}
}

protected override void ConfigureParameterWithValue(IDbDataParameter parameter, int index, object value)
{
if (value is UInt16)
{
parameter.DbType = DbType.Int32;
parameter.Value = value;
}
else if (value is UInt32)
{
parameter.DbType = DbType.Int64;
parameter.Value = value;
}
else if (value is UInt64)
{
parameter.DbType = DbType.Decimal;
parameter.Value = value;
}
else
{
base.ConfigureParameterWithValue(parameter, index, value);
}
}
}
}

0 comments on commit e450cd0

Please sign in to comment.