OLE DB-Datentypzuordnungen
Die folgende Tabelle zeigt den abgeleiteten .NET Framework Typ für Datentypen aus dem .NET Framework Datenanbieter für ADO und OLE DB (System.Data.OleDb). Die typisierten Accessormethoden für die OleDbDataReader werden ebenfalls aufgeführt.
ADO-Typ | OLE DB-Typ | .NET Framework-Typ | Typisierter .NET Framework-Accessor |
---|---|---|---|
adBigInt | DBTYPE_I8 | Int64 | GetInt64() |
adBinary | DBTYPE_BYTES | Byte[] | GetBytes() |
adBoolean | DBTYPE_BOOL | Boolean | GetBoolean() |
adBSTR | DBTYPE_BSTR | String | GetString() |
adChapter | DBTYPE_HCHAPTER | Unterstützt durch den DataReader . Weitere Informationen finden Sie unter Abrufen von Daten mithilfe eines DataReaders. |
GetValue() |
adChar | DBTYPE_STR | String | GetString() |
adCurrency | DBTYPE_CY | Decimal | GetDecimal() |
adDate | DBTYPE_DATE | Datetime | GetDateTime() |
adDBDate | DBTYPE_DBDATE | Datetime | GetDateTime() |
adDBTime | DBTYPE_DBTIME | Datetime | GetDateTime() |
adDBTimeStamp | DBTYPE_DBTIMESTAMP | Datetime | GetDateTime() |
adDecimal | DBTYPE_DECIMAL | Decimal | GetDecimal() |
adDouble | DBTYPE_R8 | Double | GetDouble() |
adError | DBTYPE_ERROR | ExternalException | GetValue() |
adFileTime | DBTYPE_FILETIME | Datetime | GetDateTime() |
adGUID | DBTYPE_GUID | Guid | GetGuid() |
adIDispatch | DBTYPE_IDISPATCH * | Object | GetValue() |
adInteger | DBTYPE_I4 | Int32 | GetInt32() |
adIUnknown | DBTYPE_IUNKNOWN * | Object | GetValue() |
adNumeric | DBTYPE_NUMERIC | Decimal | GetDecimal() |
adPropVariant | DBTYPE_PROPVARIANT | Object | GetValue() |
adSingle | DBTYPE_R4 | Single | GetFloat() |
adSmallInt | DBTYPE_I2 | Int16 | GetInt16() |
adTinyInt | DBTYPE_I1 | Byte | GetByte() |
adUnsignedBigInt | DBTYPE_UI8 | UInt64 | GetValue() |
adUnsignedInt | DBTYPE_UI4 | UInt32 | GetValue() |
adUnsignedSmallInt | DBTYPE_UI2 | UInt16 | GetValue() |
adUnsignedTinyInt | DBTYPE_UI1 | Byte | GetByte() |
adVariant | DBTYPE_VARIANT | Object | GetValue() |
adWChar | DBTYPE_WSTR | String | GetString() |
adUserDefined | DBTYPE_UDT | Nicht unterstützt | |
adVarNumeric | DBTYPE_VARNUMERIC | Nicht unterstützt |
* Für die OLE DB-Typen DBTYPE_IUNKNOWN
und DBTYPE_IDISPATCH
ist der Objektverweis eine Marshalldarstellung des Zeigers.