Select Database Table Wizard - Specify Data Range Page

Applies to TestComplete 15.70, last modified on December 17, 2024

The Select Database Table wizard is used to modify DBTable elements of the Stores > DBTables collection.

On the Specify Data Range page you can choose the fields whose data will be stored in the DBTable element and specify the number of stored records.

Data range page

Click the image to enlarge it.

By default, the DBTable element will store all of the records that the wizard retrieves from the database. To limit this number, select the Store only the specified number of records check box and enter the desired number of records into the Records number box.

If you select the Store only the specified number of records check box, then when comparing the stored and database values during the test run, TestComplete will check whether the number of stored records coincides with the actual number of records in the retrieved recordset. If the check box is unselected, then TestComplete will compare the number of records only if the stored recordset does not contain key fields (see How the Database Comparison Procedure Works for details).

The wizard page also contains a table that lists the retrieved fields. To specify that the field values to be saved to the DBTable element, select the check box in the Store column.

If a field can be used to identify records in the retrieved recordset, select the check box in the Key column. This is not necessarily the field that is marked as a key field in the database. This is the field that can be used alone or together with other key fields to identify the records in the retrieved record set (for more information on how to choose key fields, see Using Key Columns). The presence or absence of key fields affects the way, in which TestComplete compares the DBTable element’s data with the database data (see How the Database Comparison Procedure Works).

If you select the Key check box for a field, you must also select the Stored check box. Otherwise, marking the field as key is meaningless.

Since TestComplete uses key fields to identify records, make sure that the selected key field or combination of fields contain unique values in each row. Also, the database provider, which is used to access the data, should support sorting of database records on these fields. In other words, if you mark a field as a key, the provider should be able to sort data on this field. The sorting is typically supported for ordinary data types: string, integer, float, date, time and boolean. Some database engines may also support sorting on fields of other types (such as memo). The list of supported fields differ from one provider to another. To prevent problems, it is recommended to select the Key check box for the fields of ordinary types and avoid selecting the check box for non-ordinary fields such as hyperlink or memo.

See Also

Select Database Table Wizard
How the Database Verification Procedure Works
Using Key Columns
Creating Database Checkpoints
About Database Checkpoints
About DBTables Collection

Highlight search results