ComponentOne True DataControl 8.0
True DataControl Parameters

True DataControl parameters are simply variables that, unlike fields, don’t depend on a particular record. Parameter variables hold values that belong to the TData control as a whole rather than to individual records of its recordset. The rationale behind True DataControl parameters is that Visual Basic variables and controls cannot directly participate in True DataControl expressions. True DataControl parameters are also used to support a parameterized SQL statement as the data source for a TData control.

Another distinction between fields and parameters is that parameters are not exposed to data-aware controls; they can only be used by the TData control and its dependent TData controls.

Parameters can be used to accommodate parameterized SQL queries (dynamic SQL) in True DataControl, but they can serve other purposes as well. True DataControl parameters give you the means to refer to outside data, such as Visual Basic variables, in True DataControl expressions. It is not necessary for a TData control to have parameters; they should be used only if needed.

Each True DataControl parameter is represented by a Parameter object, which is an item in the Parameters collection. The Parameters collection is specified at design time in the Parameters property page, or at run time by modifying the collection returned by the Parameters property in code. You are also allowed to modify the Parameters collection in code, either outside of True DataControl events, or in the WillOpenData event. Every modification made to the Parameters collection or its individual Parameter items in code outside True DataControl events will cause the TData control to refresh its recordset. Use the ChangeInProgress property if you want to make multiple changes, and refresh only once, when all changes are done.

See Also

 

 


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

Product Support Forum  |  Documentation Feedback