SqlDbTypes

  • Thread starter Thread starter KShvats
  • Start date Start date
K

KShvats

Hey there

I have problems creating SqlParameters - 1) Could not find a table with
C# counterparts to all SqlDbTypes(e.g. do i use float or double for
SqlDbType.Float); 2) How do i find the size of column on the SQL
server(what is the size of decimal(11, 2) )

TNX
 
Hey there

I have problems creating SqlParameters - 1) Could not find a table with
C# counterparts to all SqlDbTypes(e.g. do i use float or double for
SqlDbType.Float); 2) How do i find the size of column on the SQL
server(what is the size of decimal(11, 2) )

TNX

I don't know where you can find a cross reference between the data types. I too
could not find it, but the size is not a problem. If you use the
SqlParameter.AddWithValue("@Param", somevalue) method ADO.NET will figure it out
for you.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
Thank you for the quick answer, the size is my main problem - to use
Prepare() with an SQL command you have to provide size, plus as far as I
understand there is a huge performance advantage when the size is provided.
 
Back
Top