Oracle® Data Provider for .NET Developer's Guide 10g Release 1 (10.1) Part Number B10117-01 |
|
|
View PDF |
ODP.NET types represent Oracle native types 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 in a .NET application than .NET types. For example, an OracleDecimal
holds up to 38 precisions while a .NET Decimal
holds only up to 28 precisions.
Table 3-2 lists all the Oracle native types supported by ODP.NET and their corresponding ODP.NET type. The third column lists the .NET Framework datatype that corresponds to the Value
property of each ODP.NET Type.
Table 3-2 Oracle Native Types Supported by ODP.NET
Oracle Native Type | ODP.NET Type | .NET Framework Datatypes |
---|---|---|
BFILE |
OracleBFile class |
System.Byte[] |
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[] |
NCLOB |
OracleClob class |
System.String |
NCHAR |
OracleString structure |
System.String |
NUMBER |
OracleDecimal structure |
System.Decimal |
NVARCHAR2 |
OracleString structure |
System.String |
RAW |
OracleBinary structure |
System.Byte[] |
REF CURSOR |
OracleRefCursor class |
Not Applicable |
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 |