Type Property (Remote Data)

       

Returns or sets a value that indicates the type or data type of an object.

Syntax

object.Type [= value]

The Type property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
value A constant or Integer value that specifies a datatype, as described in Return Values.

The object placeholder represents an object expression that evaluates to an object in the Applies To list.

Return Values

For an rdoColumn or rdoParameter object, the Type property returns an Integer. You can also set the Type property on the rdoParameter object to indicate the datatype of a specific procedure argument. The valid values are:

Constant Value Description
rdTypeCHAR 1 Fixed-length character string. Length set by Size property.
rdTypeNUMERIC 2 Signed, exact, numeric value with precision p and scale s (1 ≤ p ≤15; 0 ≤ s ≤ p).
rdTypeDECIMAL 3 Signed, exact, numeric value with precision p and scale s (1 ≤ p ≤15; 0 ≤ s ≤ p).
rdTypeINTEGER 4 Signed, exact numeric value with precision 10, scale 0 (signed: -231 ≤ n ≤ 231-1; unsigned:  0 ≤ n ≤ 232-1).
rdTypeSMALLINT 5 Signed, exact numeric value with precision 5, scale 0 (signed: -32,768 ≤ n ≤ 32,767, unsigned: 0 ≤ n ≤ 65,535).
rdTypeFLOAT 6 Signed, approximate numeric value with mantissa precision 15 (zero or absolute value 10-308 to 10308).
rdTypeREAL 7 Signed, approximate numeric value with mantissa precision 7 (zero or absolute value 10-38 to 1038).
rdTypeDOUBLE 8 Signed, approximate numeric value with mantissa precision 15 (zero or absolute value 10-308 to 10308).
rdTypeDATE 9 Datedata source dependent.
rdTypeTIME 10 Time — data source dependent.
rdTypeTIMESTAMP 11 TimeStamp — data source dependent.
rdTypeVARCHAR 12 Variable-length character string. Maximum length 255.
rdTypeLONGVARCHAR -1 Variable-length character string. Maximum length determined by data source.
rdTypeBINARY -2 Fixed-length binary data. Maximum length 255.
rdTypeVARBINARY -3 Variable-length binary data. Maximum length 255.
rdTypeLONGVARBINARY -4 Variable-length binary data. Maximum data source dependent.
rdTypeBIGINT -5 Signed, exact numeric value with precision 19 (signed) or 20 (unsigned), scale 0; (signed: -263 ≤ n ≤ 263-1; unsigned: 0 ≤ n ≤ 264-1).
rdTypeTINYINT -6 Signed, exact numeric value with precision 3, scale 0; (signed: -128 ≤ n ≤ 127, unsigned: 0 ≤ n ≤ 255).
rdTypeBIT -7 Single binary digit.

For an rdoQuery object, the Type property returns an Integer. The return values are:

Constant Value Query type
rdQSelect 0 Select
rdQAction 1 Action
rdQProcedures 2 Procedural
rdQCompound 3 The query contains both action and select statements

For an rdoResultset object, the Type property returns an Integer that determines the type of rdoResultset. The return values are:

Constant Value rdoResultset type
rdOpenForwardOnly 0 Fixed set, non-scrolling.
rdOpenKeyset 1 Updatable, fixed set, scrollable query result set cursor.
rdOpenDynamic 2 Updatable, dynamic set, scrollable query result set cursor.
rdOpenStatic 3 Read-only, fixed set.

Note   Not all ODBC drivers or data sources support every type of rdoResultset cursor type. If you choose a cursor that is not supported, the ODBC driver attempts to revert to a supported type. If no supported type is available, a trappable error is fired.

For an rdoTable object, the Type property returns a String. The settings for value are determined by the data source driver.

Typically, this string value is "TABLE", "VIEW", "SYSTEM TABLE", "GLOBAL TEMPORARY". "LOCAL TEMPORARY", "ALIAS", "SYNONYM" or some other data source-specific type identifier.

Remarks

Depending on the object, the Type property indicates:

Object Type indicates
rdoColumn, rdoParameter Object data type
rdoQuery Type of query
rdoResultset Type of rdoResultset
rdoTable Type of table on data source

In some cases, you must override the Type property assignment made by RDO when creating some types of parameter queries. For example, if a parameter is passed to an expression inside of an SQL statement, the ODBC driver might not be able to determine the correct type. In these cases, you can force a specific parameter to be handled as the correct type by simply setting the rdoParameter object's Type property. This is the only situation that permits you to change the Type property. In all other cases, this property is read-only.