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 data types:
Oracle Data Type
| Constant
| Value
| Data Type
|
CHAR
| ORADB_TEXT
| 10
| String
|
DATE
| ORADB_DATE
| 8
| Variant
|
LONG
| ORADB_MEMO
| 12
| String
|
LONG RAW
| ORADB_LONGBINARY
| 11
| String
|
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
|
VARCHAR2
| ORADB_TEXT
| 10
| String
|
These values are located in the file 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