G
Guest
I use floats in SQL server as they are its standard datatype for dealing with non-integral numbers
I thus thought it would be logical to use the SqlDbType.Float for accessing parameters of this type in ADO.NET, from C#
However, when I declare an SqlParameter with SqlDbType.Float as its datatype, its Value property after the command has executed can't be cast to a float, only a double. I'm OK with this if this is what the DB engine wants to do - but is it really correct?????? I know I could cast to a float but would there be much point if I'm only doing comparisons, not much maths. I'm mainly after fast performance
Thanks!
I thus thought it would be logical to use the SqlDbType.Float for accessing parameters of this type in ADO.NET, from C#
However, when I declare an SqlParameter with SqlDbType.Float as its datatype, its Value property after the command has executed can't be cast to a float, only a double. I'm OK with this if this is what the DB engine wants to do - but is it really correct?????? I know I could cast to a float but would there be much point if I'm only doing comparisons, not much maths. I'm mainly after fast performance
Thanks!