Mapping dei tipi di dati ODBC

La tabella seguente illustra il tipo .NET Framework dedotto per i tipi di dati dal provider di dati .NET Framework per ODBC (System.Data.Odbc). Sono elencati anche i meccanismi di accesso tipizzati per l’oggetto OdbcDataReader.

Tipo ODBC Tipo .NET Framework Funzione di accesso tipizzata di .NET Framework
SQL_BIGINT Int64 GetInt64()
SQL_BINARY Byte[] GetBytes()
SQL_BIT Booleano GetBoolean()
SQL_CHAR String

Char[]
GetString()

GetChars()
SQL_DECIMAL Decimale 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 Decimale GetDecimal()
SQL_REAL Singola GetFloat()
SQL_SMALLINT Int16 GetInt16()
SQL_TINYINT Byte GetByte()
SQL_TYPE_TIMES Data/Ora GetDateTime()
SQL_TYPE_TIMESTAMP Data/Ora GetDateTime()
SQL_VARBINARY Byte[] GetBytes()
SQL_WCHAR String

Char[]
GetString()

GetChars()
SQL_WLONGVARCHAR String

Char[]
GetString()

GetChars()
SQL_WVARCHAR String

Char[]
GetString()

GetChars()

Vedi anche