OLE DB-datatypmappningar
I följande tabell visas den härledda .NET Framework-typen för datatyper från .NET Framework-dataprovidern för ADO och OLE DB (System.Data.OleDb). De inskrivna åtkomstmetoderna OleDbDataReader för visas också.
ADO-typ | OLE DB-typ | .NET Framework-typ | .NET Framework-typad accessor |
---|---|---|---|
adBigInt | DBTYPE_I8 | Int64 | GetInt64() |
adBinary | DBTYPE_BYTES | Byte[] | GetBytes() |
adBoolean | DBTYPE_BOOL | Booleskt | GetBoolean() |
adBSTR | DBTYPE_BSTR | String | GetString() |
adChapter | DBTYPE_HCHAPTER | Stöds via DataReader . Se Hämta data med hjälp av en DataReader. |
GetValue() |
adChar | DBTYPE_STR | String | GetString() |
adCurrency | DBTYPE_CY | Decimal | GetDecimal() |
adDate | DBTYPE_DATE | Datum/tid | GetDateTime() |
adDBDate | DBTYPE_DBDATE | Datum/tid | GetDateTime() |
adDBTime | DBTYPE_DBTIME | Datum/tid | GetDateTime() |
adDBTimeStamp | DBTYPE_DBTIMESTAMP | Datum/tid | GetDateTime() |
adDecimal | DBTYPE_DECIMAL | Decimal | GetDecimal() |
adDouble | DBTYPE_R8 | Dubbel | GetDouble() |
adError | DBTYPE_ERROR | ExternalException | GetValue() |
adFileTime | DBTYPE_FILETIME | Datum/tid | GetDateTime() |
adGUID | DBTYPE_GUID | GUID | GetGuid() |
adIDispatch | DBTYPE_IDISPATCH * | Objekt | GetValue() |
adInteger | DBTYPE_I4 | Int32 | GetInt32() |
adIUnknown | DBTYPE_IUNKNOWN * | Objekt | GetValue() |
adNumeric | DBTYPE_NUMERIC | Decimal | GetDecimal() |
adPropVariant | DBTYPE_PROPVARIANT | Objekt | GetValue() |
adSingle | DBTYPE_R4 | Enstaka | 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 | Objekt | GetValue() |
adWChar | DBTYPE_WSTR | String | GetString() |
adUserDefined | DBTYPE_UDT | stöds inte | |
adVarNumeric | DBTYPE_VARNUMERIC | stöds inte |
* För OLE DB-typerna DBTYPE_IUNKNOWN
och DBTYPE_IDISPATCH
är objektreferensen en samlad representation av pekaren.