日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程语言 > asp.net >内容正文

asp.net

SqlServer与.NET的数据类型映射关系图

發(fā)布時(shí)間:2023/12/10 asp.net 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SqlServer与.NET的数据类型映射关系图 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.


關(guān)系表

SQL Server 數(shù)據(jù)庫(kù)引擎類型

.NET Framework 類型

SqlDbType 枚舉

SqlDataReader SqlTypes 類型化訪問(wèn)器

DbType 枚舉

SqlDataReader DbType 類型化訪問(wèn)器

bigint

Int64

BigInt

GetSqlInt64

Int64

GetInt64

binary

Byte[]

VarBinary

GetSqlBinary

Binary

GetBytes

bit

Boolean

Bit

GetSqlBoolean

Boolean

GetBoolean

char

String

Char[]

Char

GetSqlString

AnsiStringFixedLength,

String

GetString

GetChars

date

(僅適用 SQL Server 2008)

DateTime

Date

GetSqlDateTime

Date

GetDateTime

datetime

DateTime

DateTime

GetSqlDateTime

DateTime

GetDateTime

datetime2

(僅適用 SQL Server 2008)

DateTime2

DateTime2

GetSqlDateTime

DateTime2

GetDateTime

datetimeoffset

(僅適用 SQL Server 2008)

DateTimeOffset

DateTimeOffset

none

DateTimeOffset

GetDateTimeOffset

decimal

Decimal

Decimal

GetSqlDecimal

Decimal

GetDecimal

FILESTREAM 屬性 (varbinary(max)

Byte[]

VarBinary

GetSqlBytes

Binary

GetBytes

float

Double

Float

GetSqlDouble

Double

GetDouble

image

Byte[]

Binary

GetSqlBinary

Binary

GetBytes

int

Int32

Int

GetSqlInt32

Int32

GetInt32

money

Decimal

Money

GetSqlMoney

Decimal

GetDecimal

nchar

String

Char[]

NChar

GetSqlString

StringFixedLength

GetString

GetChars

ntext

String

Char[]

NText

GetSqlString

String

GetString

GetChars

numeric

Decimal

Decimal

GetSqlDecimal

Decimal

GetDecimal

nvarchar

String

Char[]

NVarChar

GetSqlString

String

GetString

GetChars

real

Single

Real

GetSqlSingle

Single

GetFloat

rowversion

Byte[]

Timestamp

GetSqlBinary

Binary

GetBytes

smalldatetime

DateTime

DateTime

GetSqlDateTime

DateTime

GetDateTime

smallint

Int16

SmallInt

GetSqlInt16

Int16

GetInt16

smallmoney

Decimal

SmallMoney

GetSqlDecimal

Decimal

GetDecimal

sql_variant

Object*

Variant

GetSqlValue?*

Object

GetValue?*

text

String

Char[]

Text

GetSqlString

String

GetString

GetChars

time

(僅適用 SQL Server 2008)

TimeSpan

Time

none

Time

GetDateTime

timestamp

Byte[]

Timestamp

GetSqlBinary

Binary

GetBytes

tinyint

Byte

TinyInt

GetSqlByte

Byte

GetByte

uniqueidentifier

Guid

UniqueIdentifier

GetSqlGuid

Guid

GetGuid

varbinary

Byte[]

VarBinary

GetSqlBinary

Binary

GetBytes

varchar

String

Char[]

VarChar

GetSqlString

AnsiString,?String

GetString

GetChars

xml

Xml

Xml

GetSqlXml

Xml

none


總結(jié)

以上是生活随笔為你收集整理的SqlServer与.NET的数据类型映射关系图的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。