Oracle Heterogeneous Services Release 8.1.7 Part Number A88714-01 |
Library | Service | Contents | Index

# E
Datatype Mapping

Oracle8i maps the datatypes used in ODBC and OLE DB compliant data sources to supported Oracle datatypes. When the results of a query are returned, Oracle8i converts the ODBC or OLE DB datatypes to Oracle datatypes. For information on how the datatypes are mapped for each data source, see the following:

- Mapping ODBC Datatypes to Oracle Datatypes

- Mapping OLE DB Datatypes to Oracle Datatypes

## Mapping ODBC Datatypes to Oracle Datatypes

This table shows the mapping from ODBC datatypes to Oracle datatypes:

ODBC | Oracle
--- | ---
SQL_BIGINT | NUMBER(19,0)
SQL_BINARY | RAW
SQL_CHAR | CHAR
SQL_DATE | DATE
SQL_DECIMAL(p,s) | NUMBER(p,s)
SQL_DOUBLE | FLOAT(49)
SQL_FLOAT | FLOAT(49)
SQL_INTEGER | NUMBER(10)
SQL_LONGVARBINARY | LONG RAW
SQL_LONGVARCHAR | LONG
SQL_NUMERIC(p,s) | NUMBER(p,s)
SQL_REAL | FLOAT(23)
SQL_SMALLINT | NUMBER(5)
SQL_TIME | DATE
SQL_TIMESTAMP | DATE
SQL_TINYINT | NUMBER(3)
SQL_VARCHAR | VARCHAR

## Mapping OLE DB Datatypes to Oracle Datatypes

This table shows the mapping from OLE DB datatypes to Oracle datatypes:

OLE DB | Oracle
--- | ---
DBTYPE_UI1 | NUMBER(3)
DBTYPE_I1 | NUMBER(3)
DBTYPE_UI2 | NUMBER(5)
DBTYPE_I2 | NUMBER(5)
DBTYPE_BOOL | NUMBER(5)
DBTYPE_UI4 | NUMBER(10)
DBTYPE_I4 | NUMBER(10)
DBTYPE_UI8 | NUMBER(19,0)
DBTYPE_I8 | NUMBER(19,0)
DBTYPE_NUMERIC(p,s) | NUMBER(p,s)
DBTYPE_R4 | FLOAT(23)
DBTYPE_R8 | FLOAT(49)
DBTYPE_DECIMAL | FLOAT(49)
DBTYPE_STR | VARCHAR2
DBTYPE_WSTR | VARCHAR2
DBTYPE_CY | NUMBER(19,0)
DBTYPE_DBDATE | DATE
DBTYPE_DBTIME | DATE
DBTYPE_DBTIMESTAMP | DATE
DBTYPE_BYTES | RAW
DTYPE_BYTES (long attribute) | LONG RAW
DBTYPE_STRING (long attribute) | LONG

| Copyright © 1996-2001 Oracle Corporation. All Rights Reserved. |
Library | Service | Contents | Index