Table 71 Data Type Mapping

SqlDbType from

Native SQL Server

System.Data.SqlTypes

System.Data

Bigint

SqlInt64

BigInt

Binary

SqlBinary

Binary

Bit

SqlBit

Bit

Char

SqlString

Char

Datetime

SqlDateTime

DateTime

Decimal

SqlNumeric

Decimal

Float

SqlDouble

Float

Image

SqlBinary

Image

Int

SqlInt32

Int

Money

SqlMoney

Money

Nchar

SqlString

NChar

Ntext

SqlString

Table 7.1 Continued

Native SQL Server

System.Data.SqlTypes

SqlDbType from System.Data

Numeric

SqlNumeric

Numeric

Nvarchar

SqlString

NVarChar

Real

SqlSingle

Real

Smalldatetime

SqlDateTime

SmallDateTime

Smallint

SqlInt16

SmallInt

Smallmoney

SqlMoney

SmallMoney

sql_variant

Object

Variant

Sysname

SqlString

VarChar

Text

SqlString

Text

Timestamp

SqlBinary

TimeStamp

Tinyint

SqlByte

TinyInt

Uniqueidentifier

SqlGuid

Uniqueld

Varbinary

SqlBinary

VarBinary

Varchar

SqlString

VarChar

0 0

Post a comment