Pemetaan Jenis Data OLE DB
Tabel berikut menunjukkan jenis .NET Framework yang disimpulkan untuk jenis data dari Penyedia Data .NET Framework untuk ADO dan OLE DB (System.Data.OleDb). Metode pengakses berjenis untuk OleDbDataReader juga terdaftar.
Jenis ADO | Jenis OLE DB | Jenis .NET Framework | Pengakses berjenis .NET Framework |
---|---|---|---|
adBigInt | DBTYPE_I8 | Int64 | GetInt64() |
adBinary | DBTYPE_BYTES | Byte[] | GetBytes() |
adBoolean | DBTYPE_BOOL | Boolean | GetBoolean() |
adBSTR | DBTYPE_BSTR | String | GetString() |
adChapter | DBTYPE_HCHAPTER | Didukung melalui DataReader . Lihat Mengambil Data Menggunakan DataReader. |
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 | Laju | GetDouble() |
adError | DBTYPE_ERROR | ExternalException | GetValue() |
adFileTime | DBTYPE_FILETIME | DateTime | GetDateTime() |
adGUID | DBTYPE_GUID | Guid | GetGuid() |
adIDispatch | DBTYPE_IDISPATCH * | Objek | GetValue() |
adInteger | DBTYPE_I4 | Int32 | GetInt32() |
adIUnknown | DBTYPE_IUNKNOWN * | Objek | GetValue() |
adNumeric | DBTYPE_NUMERIC | Decimal | GetDecimal() |
adPropVariant | DBTYPE_PROPVARIANT | Objek | GetValue() |
adSingle | DBTYPE_R4 | Tunggal | 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 | Objek | GetValue() |
adWChar | DBTYPE_WSTR | String | GetString() |
adUserDefined | DBTYPE_UDT | tidak didukung | |
adVarNumeric | DBTYPE_VARNUMERIC | tidak didukung |
* Untuk jenis DBTYPE_IUNKNOWN
dan DBTYPE_IDISPATCH
OLE DB, referensi objek adalah representasi tersusun dari penunjuk.