Skip Headers
Oracle® Data Provider for .NET Developer's Guide
10g Release 2 (10.2)

Part Number B14307-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

ODP.NET Types Overview

ODP.NET types represent Oracle native datatypes and PL/SQL datatypes as a structure or as a class. ODP.NET type structures follow value semantics, while ODP.NET type classes follow reference semantics. ODP.NET types provide safer and more efficient ways of obtaining Oracle native data and PL/SQL datatypes in a .NET application than .NET types. For example, an OracleDecimal structure holds up to 38 precisions, while a .NET Decimal holds up to only 28 precisions.

Table 3-8 lists datatypes supported by ODP.NET and their corresponding ODP.NET types: datatypes in the first column refer to both Oracle native datatypes and PL/SQL datatypes of that name. Those datatypes that exist only in PL/SQL are indicated by (PL/SQL only) after the datatype name. The entries for the PL/SQL datatypes also represent the subtypes of the datatypes, if any. The third column lists the .NET Framework datatype that corresponds to the Value property of each ODP.NET type.

Table 3-8 Value Property Type of ODP.NET Type

Oracle Native Datatype or PL/SQL Datatype ODP.NET Type .NET Framework Datatypes
BFILE OracleBFile class System.Byte[]
BINARY_DOUBLE OracleDecimal structure System.Decimal
BINARY_FLOAT OracleDecimal structure System.Decimal
BINARY_INTEGER (PL/SQL only) OracleDecimal structure System.Decimal
BLOB OracleBlob class System.Byte[]
CHAR OracleString structure System.String
CLOB OracleClob class System.String
DATE OracleDate structure System.DateTime
INTERVAL DAY TO SECOND OracleIntervalDS structure System.TimeSpan
INTERVAL YEAR TO MONTH OracleIntervalYM structure System.Int64
LONG OracleString structure System.String
LONG RAW OracleBinary structure System.Byte[]
NCHAR OracleString structure System.String
NCLOB OracleClob class System.String
NUMBER OracleDecimal structure System.Decimal
NVARCHAR2 OracleString structure System.String
PLS_INTEGER (PL/SQL only) OracleDecimal Structure System.Decimal
RAW OracleBinary structure System.Byte[]
REF CURSOR (PL/SQL only) OracleRefCursor class Not Applicable
ROWID OracleString structure System.String
TIMESTAMP OracleTimeStamp structure System.DateTime
TIMESTAMP WITH LOCAL TIME ZONE OracleTimeStampLTZ structure System.DateTime
TIMESTAMP WITH TIME ZONE OracleTimeStampTZ structure System.DateTime
UROWID OracleString structure System.String
VARCHAR2 OracleString structure System.String
XMLType OracleXmlType class System.String