Advantage TDataSet Descendant
Determines if a filter or index expression is valid.
function AdsIsExprValid( strExpression : String ) : Boolean;
|
strExpression |
Expression to check. |
AdsIsExprValid tests whether an expression can be handled by the Advantage Expression Engine. If not, the return value will be False. If the expression is not valid, an application can call AdsGetLastError to retrieve the specific error code that will indicate why the expression is not valid. Note that if the table type is not ttAdsADT and the expression contains the binary concatenation operator (e.g., 'lastname;firstname') or data types that are specific to ADT tables, then the return value will be False.
strExpression := 'LastName < "C" AND DeptNum < 60 AND Left( FirstName, 1 ) == "A"';
if (AdsTable1.AdsIsExprValid( strExpression )) then
AdsTable1.AdsSetFilter( strExpression );