description | title | ms.date | ms.assetid |
---|---|---|---|
Learn more about: ODBC Data Type Mappings |
ODBC Data Type Mappings |
03/30/2017 |
43c35d32-831d-480f-a150-78f7e869d17f |
The following table shows the inferred .NET Framework type for data types from the .NET Framework Data Provider for ODBC (xref:System.Data.Odbc). The typed accessor methods for the xref:System.Data.Odbc.OdbcDataReader are also listed.
ODBC type | .NET Framework type | .NET Framework typed accessor |
---|---|---|
SQL_BIGINT | Int64 | GetInt64() |
SQL_BINARY | Byte[] | GetBytes() |
SQL_BIT | Boolean | GetBoolean() |
SQL_CHAR | String Char[] |
GetString() GetChars() |
SQL_DECIMAL | Decimal | GetDecimal() |
SQL_DOUBLE | Double | GetDouble() |
SQL_GUID | Guid | GetGuid() |
SQL_INTEGER | Int32 | GetInt32() |
SQL_LONG_VARCHAR | String Char[] |
GetString() GetChars() |
SQL_LONGVARBINARY | Byte[] | GetBytes() |
SQL_NUMERIC | Decimal | GetDecimal() |
SQL_REAL | Single | GetFloat() |
SQL_SMALLINT | Int16 | GetInt16() |
SQL_TINYINT | Byte | GetByte() |
SQL_TYPE_TIMES | DateTime | GetDateTime() |
SQL_TYPE_TIMESTAMP | DateTime | GetDateTime() |
SQL_VARBINARY | Byte[] | GetBytes() |
SQL_WCHAR | String Char[] |
GetString() GetChars() |
SQL_WLONGVARCHAR | String Char[] |
GetString() GetChars() |
SQL_WVARCHAR | String Char[] |
GetString() GetChars() |