ComponentOne Query 8.0
Type Checking in Condition Items

Using custom comparisons, a problem can arise with the constant value (right part of the comparison) data type. In all standard comparisons, its data type is determined by the field type. With custom comparisons, it is not necessarily the case. For example, in comparison Year(Field)=Value, the Value's type must be Integer, although the Field's type is Date.

To deal with cases like this, use a special property: EditTypeChecking. It is True by default. If set to False, it disables type checking after the user enters a constant value. Using the EndEdit event, the developer can set the value in the query item to a value of any required type.

If EditTypeChecking=True, and the value in the item has data type different from that of the field, and the developer does not change the edited value in BeforeEdit and EndEdit events, then an "Invalid data format" error is generated before and after editing, correspondingly.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback