做个记录..省的以后找的麻烦啦..
关系表
SQL Server 数据库引擎类型 | .NET Framework 类型 | SqlDbType 枚举 | SqlDataReader SqlTypes 类型化访问器 | DbType 枚举 | SqlDataReader DbType 类型化访问器 |
---|
bigint
Int64
binary
Byte[]
bit
Boolean
char
String
Char[]
date
(仅适用 SQL Server 2008)
DateTime
datetime
DateTime
datetime2
(仅适用 SQL Server 2008)
DateTime2
datetimeoffset
(仅适用 SQL Server 2008)
DateTimeOffset
none
decimal
Decimal
FILESTREAM 属性 (varbinary(max)
Byte[]
float
Double
image
Byte[]
int
Int32
money
Decimal
nchar
String
Char[]
ntext
String
Char[]
numeric
Decimal
nvarchar
String
Char[]
real
Single
rowversion
Byte[]
smalldatetime
DateTime
smallint
Int16
smallmoney
Decimal
sql_variant
Object*
GetValue *
text
String
Char[]
time
(仅适用 SQL Server 2008)
TimeSpan
none
timestamp
Byte[]
tinyint
Byte
uniqueidentifier
Guid
varbinary
Byte[]
varchar
String
Char[]
xml
Xml
none
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/16436858/viewspace-663357/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/16436858/viewspace-663357/