.NET Framework Data Provider for SQL Server
SQL Server type |
.NET Framework type |
.NET Framework typed accessor |
SqlType typed accessor |
bigint |
Int64 |
GetInt64() |
GetSqlInt64() |
binary |
Byte[] |
GetBytes() |
GetSqlBinary() |
bit |
Boolean |
GetBoolean() |
GetSqlBit() |
char |
String Char[] |
GetString() GetChars() |
GetSqlString() |
datetime |
DateTime |
GetDateTime() |
GetSqlDateTime() |
decimal |
Decimal |
GetDecimal() |
GetSqlDecimal() |
float |
Double |
GetDouble() |
GetSqlDouble() |
image |
Byte[] |
GetBytes() |
GetSqlBinary() |
int |
Int32 |
GetInt32() |
GetSqlInt32() |
money |
Decimal |
GetDecimal() |
GetSqlMoney() |
nchar |
String Char[] |
GetString() GetChars() |
GetSqlString() |
ntext |
String Char[] |
GetString() GetChars() |
GetSqlString() |
numeric |
Decimal |
GetDecimal() |
GetSqlDecimal() |
nvarchar |
String Char[] |
GetString() GetChars() |
GetSqlString() |
real |
Single |
GetFloat() |
GetSqlSingle() |
smalldatetime |
DateTime |
GetDateTime() |
GetSqlDateTime() |
smallint |
Int16 |
GetInt16() |
GetSqlInt16() |
smallmoney |
Decimal |
GetDecimal() |
GetSqlDecimal() |
sql_variant |
Object * |
GetValue() * |
GetSqlValue() * |
text |
String Char[] |
GetString() GetChars() |
GetSqlString() |
timestamp |
Byte[] |
GetBytes() |
GetSqlBinary() |
tinyint |
Byte |
GetByte() |
GetSqlByte() |
uniqueidentifier |
Guid |
GetGuid() |
GetSqlGuid() |
varbinary |
Byte[] |
GetBytes() |
GetSqlBinary() |
varchar |
String Char[] |
GetString() GetChars() |
GetSqlString() |
如想知道與其他資料庫的對應關係。看MSDN:http://msdn2.microsoft.com/en-us/library/4e5xt97a(vs.71).aspx