Asignaciones de tipos de datos de OLE DBOLE DB Data Type Mappings

En la tabla siguiente se muestra el tipo inferido de .NET Framework para tipos de datos desde el proveedor de datos de .NET Framework para ADO y OLE DB (System.Data.OleDb).The following table shows the inferred .NET Framework type for data types from the .NET Framework Data Provider for ADO and OLE DB (System.Data.OleDb). Los métodos de descriptor de acceso con tipo para el OleDbDataReader también se muestran.The typed accessor methods for the OleDbDataReader are also listed.

Tipo de ADOADO type Tipo de OLE DBOLE DB type Tipo de .NET Framework.NET Framework type Descriptor de acceso de tipo de .NET framework.NET Framework typed accessor
adBigIntadBigInt DBTYPE_I8DBTYPE_I8 Int64Int64 GetInt64()GetInt64()
adBinaryadBinary DBTYPE_BYTESDBTYPE_BYTES Byte[]Byte[] GetBytes()GetBytes()
adBooleanadBoolean DBTYPE_BOOLDBTYPE_BOOL BooleanoBoolean GetBoolean()GetBoolean()
adBSTRadBSTR DBTYPE_BSTRDBTYPE_BSTR StringString GetString()GetString()
adChapteradChapter DBTYPE_HCHAPTERDBTYPE_HCHAPTER Compatible con DataReader.Supported through the DataReader. Consulte recuperar datos mediante DataReader.See Retrieving Data Using a DataReader. GetValue()GetValue()
adCharadChar DBTYPE_STRDBTYPE_STR StringString GetString()GetString()
adCurrencyadCurrency DBTYPE_CYDBTYPE_CY DecimalDecimal GetDecimal()GetDecimal()
adDateadDate DBTYPE_DATEDBTYPE_DATE DateTimeDateTime GetDateTime()GetDateTime()
adDBDateadDBDate DBTYPE_DBDATEDBTYPE_DBDATE DateTimeDateTime GetDateTime()GetDateTime()
adDBTimeadDBTime DBTYPE_DBTIMEDBTYPE_DBTIME DateTimeDateTime GetDateTime()GetDateTime()
adDBTimeStampadDBTimeStamp DBTYPE_DBTIMESTAMPDBTYPE_DBTIMESTAMP DateTimeDateTime GetDateTime()GetDateTime()
adDecimaladDecimal DBTYPE_DECIMALDBTYPE_DECIMAL DecimalDecimal GetDecimal()GetDecimal()
adDoubleadDouble DBTYPE_R8DBTYPE_R8 DobleDouble GetDouble()GetDouble()
adErroradError DBTYPE_ERRORDBTYPE_ERROR ExternalExceptionExternalException GetValue()GetValue()
adFileTimeadFileTime DBTYPE_FILETIMEDBTYPE_FILETIME DateTimeDateTime GetDateTime()GetDateTime()
adGUIDadGUID DBTYPE_GUIDDBTYPE_GUID GUIDGuid GetGuid()GetGuid()
adIDispatchadIDispatch DBTYPE_IDISPATCH *DBTYPE_IDISPATCH * ObjectObject GetValue()GetValue()
adIntegeradInteger DBTYPE_I4DBTYPE_I4 Int32Int32 GetInt32()GetInt32()
adIUnknownadIUnknown DBTYPE_IUNKNOWN *DBTYPE_IUNKNOWN * ObjectObject GetValue()GetValue()
adNumericadNumeric DBTYPE_NUMERICDBTYPE_NUMERIC DecimalDecimal GetDecimal()GetDecimal()
adPropVariantadPropVariant DBTYPE_PROPVARIANTDBTYPE_PROPVARIANT ObjectObject GetValue()GetValue()
adSingleadSingle DBTYPE_R4DBTYPE_R4 SingleSingle GetFloat()GetFloat()
adSmallIntadSmallInt DBTYPE_I2DBTYPE_I2 Int16Int16 GetInt16()GetInt16()
adTinyIntadTinyInt DBTYPE_I1DBTYPE_I1 ByteByte GetByte()GetByte()
adUnsignedBigIntadUnsignedBigInt DBTYPE_UI8DBTYPE_UI8 UInt64UInt64 GetValue()GetValue()
adUnsignedIntadUnsignedInt DBTYPE_UI4DBTYPE_UI4 UInt32UInt32 GetValue()GetValue()
adUnsignedSmallIntadUnsignedSmallInt DBTYPE_UI2DBTYPE_UI2 UInt16UInt16 GetValue()GetValue()
adUnsignedTinyIntadUnsignedTinyInt DBTYPE_UI1DBTYPE_UI1 ByteByte GetByte()GetByte()
adVariantadVariant DBTYPE_VARIANTDBTYPE_VARIANT ObjectObject GetValue()GetValue()
adWCharadWChar DBTYPE_WSTRDBTYPE_WSTR StringString GetString()GetString()
adUserDefinedadUserDefined DBTYPE_UDTDBTYPE_UDT no admitidonot supported
adVarNumericadVarNumeric DBTYPE_VARNUMERICDBTYPE_VARNUMERIC no admitidonot supported

* Para los tipos OLE DB DBTYPE_IUNKNOWN y DBTYPE_IDISPATCH, la referencia de objeto es una representación del puntero con referencias calculadas.* For the OLE DB types DBTYPE_IUNKNOWN and DBTYPE_IDISPATCH, the object reference is a marshaled representation of the pointer.

Vea tambiénSee also