Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

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

Type Property

See Also

Applies To

OraField

OraParameter

OraParamArray

Description

Returns the variant type of the specified object. Not available at design time and read-only at run time.

Usage

data_type = orafield.Type

data_type = oraparameter.Type

data_type = oraparamarray.Type

Remarks

orafield.Type returns the variant data type (see Visual Basic documentation) associated with the returned value of this field.

Users can expect the following mapping from Oracle internal datatypes:

Mapping From Oracle Internal Datatypes

Oracle Datatype
Constant
Value
Datatype
BINARY_DOUBLE
ORADB_DOUBLE
7
Double
BINARY_FLOAT
ORADB_SINGLE
6
Single
BLOB
ORADB_OBJECT
9
OraBLOB
CHAR
ORADB_TEXT
10
String
CLOB
ORADB_OBJECT
9
OraCLOB
DATE
ORADB_DATE
8
Variant
DATE
ORADB_DATE
8
Date
INTERVAL DAY TO SECOND
ORADB_OBJECT
9
OraIntervalDS
INTERVAL YEAR TO MONTH
ORADB_OBJECT
9
OraIntervalYM
LONG
ORADB_MEMO
12
String
LONG RAW
ORADB_LONGBINARY
11
String
NESTED TABLE
ORADB_OBJECT
9
OraBFILE
NUMBER (1-4,0)
ORADB_INTEGER
3
Integer
NUMBER (5-9,0)
ORADB_LONG
4
Long Integer
NUMBER (10-15,0)
ORADB_DOUBLE
7
Double
NUMBER (16-38,0)
ORADB_TEXT
10
String
NUMBER (1-15,n)
ORADB_DOUBLE
7
Double
NUMBER (16-38,n)
ORADB_TEXT
10
String
RAW
ORADB_LONGBINARY
11
String
REF
ORADB_OBJECT
9
OraCollection
TIMESTAMP
ORADB_OBJECT
9
OraTimeStamp
TIMESTAMP WITH LOCAL TIME ZONE
ORADB_OBJECT
9
OraTimeStamp
TIMESTAMP WITH TIME ZONE
ORADB_OBJECT
9
OraTimeStampTZ
VARRAY
ORADB_OBJECT
9
OraCollection
VARCHAR2
ORADB_TEXT
10
String

These values are located in the file ORACLE_BASE\ORACLE_HOME\oo4o\oraconst.txt and are intended to match similar constants in the Visual Basic file datacons.txt.

oraparameter.Type returns an integer indicating the variant data type that is actually bound to the SQL statement. This may differ from the variant data type of oraparameter.Value, because internal conversions may be necessary to obtain a data type common to both Visual Basic and the Oracle database.

Note that fields of type DATE are returned in the default Visual Basic format as specified in the control panel, even though the default Oracle date format is "DD-MMM-YY".

Note that columns defined simply as "NUMBER" instead of "NUMBER(precision, scale)" are, by definition, floating point numbers with a precision of 38. This means that the Type property will return a type of ORADB_TEXT for these columns.

Data Type

Integer