Shows the SQL server types, the corresponding Sql types, and the GetSql*** methods used to read a column as the Sql type

image_pdfimage_print
   


Sql* TYPE            VALUES               
===============================================================================
Sql Binary           A variable-length string of binary data.

SqlBoolean           An integer with either a 1 or 0 value.

SqlByte              An 8-bit unsigned integer value between 0 and 2^8 - 1 (255).

SqlDateTime          A date and time between 12:00:00 AM January 1, 1753 and 11:59:59 PM December 31, 9999. This is accurate to 3.33 milliseconds.

SqlDecimal           Fixed precision and scale numeric value between -1038 + 1 and 1038 - 1.

SqlDouble            A 64-bit floating-point number between -1.79769313486232E308 and 1.79769313486232E308 with 15 significant figures of precision.

SqlGuid              A 128-bit integer value (16 bytes) that that is unique across all computers and networks.

SqlInt16             A 16-bit signed integer between -2^15 (-32,768) and 2^15 - 1 (32,767).

SqlInt32             A 32-bit signed integer between-2^31 (-2,147,483,648) and 2^31 - 1 (2,147,483,647).

SqlInt64             A 64-bit signed integer between -2^63 (-9,223,372,036,854,775,808) and 2^63 - 1 (9,223,372,036,854,775,807).

SqlMoney             A currency value between -922,337,203,685,477.5808 and 922,337,203,685,477.5807. This is accurate to 1/10,000th of a currency unit.

SqlSingle            A 32-bit floating-point number between -3.402823E38 and 3.402823E38 with seven significant figures of precision.

SqlString            A variable-length string of characters.