Value Property

Applies to TestComplete 14.40, last modified on April 22, 2021

Description

Use the Value property to obtain the value stored in the specified column of the current record of the data storage to which ProgObj provides access.

Declaration

ProgObj.Value(Index)

Read-Only Property Variant
ProgObj An expression, variable or parameter that specifies a reference to one of the objects listed in the Applies To section
Index [in]    Required    Variant    

Applies To

The property is applied to the following object:

Parameters

The property has the following parameter:

Index

Specifies either the name or index of the desired column. Index of the first column is 0, index of the second column - 1, and so on. The total number of columns is specified by the ColumnCount property.

If the specified column does not exist, an error will occur.

Property Value

The column value. If the column value is incompatible with OLE Variant, the property will return an empty Variant value.

Remarks

If you use Python or DelphiScript, you should enclose the parameter of the ProgObj.Value property in square brackets: ProgObj.Value[Index].

If the Excel DDT driver retrieves data by using the Microsoft Excel ODBC driver, the latter can truncate cell data to 255 symbols. To determine the data type of a column, Excel scans the column cells of the first 8 rows. If each of these cells contains text shorter than 256 characters, all the subsequent cell values will be truncated to 255 symbols. For more information on this problem and on possible workarounds, see http://support.microsoft.com/kb/189897/.

Example

To view an example that demonstrates how to use this property, see the Using DDT Drivers topic.

See Also

ColumnCount Property
Using DDT Drivers

Highlight search results