ComponentOne True DataControl 8.0
Null Handling

Two properties, ConvertNullToEmpty and ConvertEmptyToNull specify the handling of Null values stored in the data source:

If ConvertNullToEmpty =True (default), a Null value of a string field retrieved from the data source is converted to empty string. This makes it easier to deal with such values in expressions and code, since VBScript and Visual Basic expressions have special behavior on Null values, which is usually undesirable, and empty strings are easier to handle. Non-string fields are not affected by this property. If you need to convert Nulls to some particular values for such fields, use the DataRead event.

If ConvertEmptyToNull =True (default), TData saves empty string values in the data source as Null values. Otherwise, empty strings are written literally, as empty strings. Most databases will convert them to Null anyway, so it rarely makes sense to change the default ConvertEmptyToNull=True to False. Non-string fields are not affected by this property. If you need to convert some particular values (for example, 0) to Null for such fields, use the DataWrite event.

 

 


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

Product Support Forum  |  Documentation Feedback