O'Reilly logo

Essential ADO.NET by Bob Beauchemin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A.2. Mapping SQL Server Data Types to SqlTypes and SqlDbTypes

Table A-2 maps the members of the System.Data.SqlTypes namespace to Microsoft SQL Server data types and to the members of the SqlDbType enumeration.

Table A-2. Mapping SQL Server data types to .NET types
Native SQL Server .NET Framework SqlTypes .NET Framework SqlDbType
binary SqlBinary Binary
Bigint SqlInt64 BigInt
Char SqlString Char
datetime SqlDateTime DateTime
decimal SqlDecimal Decimal
Float SqlDouble Float
image SqlBinary Image
Int SqlInt32 Int
Money SqlMoney Money
nchar SqlString NChar
Ntext SqlString NText
nvarchar SqlString NVarChar
Numeric SqlDecimal Numeric
Real SqlSingle Real
smalldatetime SqlDateTime SmallDateTime
smallint SqlInt16 SmallInt
smallmoney SqlMoney SmallMoney ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required