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.
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 ... |
Get Essential ADO.NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.