Bde.DBTables.TQuery.Constrained

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Constrained: Boolean read FConstrained write FConstrained default False;

C++

__property bool Constrained = {read=FConstrained, write=FConstrained, default=0};

Properties

Type Visibility Source Unit Parent
property published
Bde.DBTables.pas
Bde.DBTables.hpp
Bde.DBTables TQuery

Description

Indicates whether updates and inserts that don't conform to the result set generated by a SELECT statement are permitted for Paradox and dBASE tables

Use Constrained to determine whether or not edits and insertions are permitted to a Paradox or dBASE table underlying a result set when the UPDATE or INSERT statements contain one or more values that do not comply with the WHERE clause conditions of the SELECT statement that generated the result set. Constrained only applies to live result sets. Constraints are enforced during the editing process.

If Constrained is false (the default), updates and inserts are permitted regardless of the SELECT statement criteria. If true, updates and inserts are not permitted if they violate the criteria of the SELECT statement that generated the result set.

For example, if Constrained is true and a query component's SQL property is

SELECT *
FROM CUSTOMERS
WHERE (CUSTNO > 1400) AND (CUSTNO < 1500)

then the user would not be allowed to enter a value for CustNo that fell outside this range of values.

See Also