Database Reference
In-Depth Information
SQL Server Data Types
.NET Type
.NET Typed Accessor
money
Decimal
GetDecimal
nchar
String or Char[]
GetString or GetChars
ntext
String or Char[]
GetString or GetChars
numeric
Decimal
GetDecimal
nvarchar
String or Char[]
GetString or GetChars
real
Single
GetFloat
smalldatetime
DateTime
GetDateTime
smallint
Intl6
Getlntl6
smallmoney
Decimal
GetDecimal
sql variant
Object
GetValue
long varchar
String or Char[]
GetString or GetChars
timestamp
Byte[]
GetBytes
tinyint
Byte
GetByte
uniqueidentifier
Guid
GetGuid
varbinary
Byte[]
GetBytes
varchar
String or Char[]
GetString or GetChars
Table 14-2 lists some available OLE DB data types, their corresponding .NET types, and their .NET
typed accessors.
Table 14-2. OLE DB Typed Accessors
OLE DB Type
.NET Type
.NET Typed Accessor
DBTYPE_I8 Int64
GetInt64
DBTYPE_BYTES Byte[]
GetBytes
DBTYPE_BOOL Boolean
GetBoolean
 
Search WWH ::




Custom Search