By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,237 Members | 1,842 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,237 IT Pros & Developers. It's quick & easy.

SQL Server Float and Real datatypes

P: n/a
What are the best .NET datatypes to handle SQL Server's Float and Real
datatypes? I'd like to avoid using the SQL Server specific datatypes like
SqlInt32 or similar.

Thanks in advance.

-Mark
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
SqlDouble Float

and
SqlSingle Real
Though highly recommended that for talking to the d/b you should use
SqlDbType.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"Mark" <Ma**@nowhere.com> wrote in message
news:ek**************@TK2MSFTNGP11.phx.gbl...
What are the best .NET datatypes to handle SQL Server's Float and Real
datatypes? I'd like to avoid using the SQL Server specific datatypes like
SqlInt32 or similar.

Thanks in advance.

-Mark

Nov 16 '05 #2

P: n/a
And if I still didn't want to use the SqlXxxxx datatypes, which .NET
datatypes would work best? Thanks again.

Mark

"Sahil Malik" <co*****************@nospam.com> wrote in message
news:On**************@TK2MSFTNGP09.phx.gbl...
SqlDouble Float

and
SqlSingle Real
Though highly recommended that for talking to the d/b you should use
SqlDbType.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"Mark" <Ma**@nowhere.com> wrote in message
news:ek**************@TK2MSFTNGP11.phx.gbl...
What are the best .NET datatypes to handle SQL Server's Float and Real
datatypes? I'd like to avoid using the SQL Server specific datatypes like SqlInt32 or similar.

Thanks in advance.

-Mark


Nov 16 '05 #3

P: n/a
Okay I should have been a bit clearer. Here is the conversion you need --

Native Sql Server Float --> System.Data.SqlTypes.SqlDouble --> .NET DataType
Double
Native Sql Server Real --> System.Data.SqlTypes.SqlSingle --> .NET
DataType Single

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik


"Sahil Malik" <co*****************@nospam.com> wrote in message
news:On**************@TK2MSFTNGP09.phx.gbl...
SqlDouble Float

and
SqlSingle Real
Though highly recommended that for talking to the d/b you should use
SqlDbType.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik

"Mark" <Ma**@nowhere.com> wrote in message
news:ek**************@TK2MSFTNGP11.phx.gbl...
What are the best .NET datatypes to handle SQL Server's Float and Real
datatypes? I'd like to avoid using the SQL Server specific datatypes like SqlInt32 or similar.

Thanks in advance.

-Mark


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.