Page 1 of 1

Select SQL

Posted: Sat 15 Apr 2006 09:12
by Frenk
hi,
I am using MIDAS with SDAC TMSQuery for DB access. At design time, I create "base" sql query (TMSQuery.SQL). Then, I modify it (adding constraints using additional "where" SQL) every time SQL is requested (onBeforeGetRecords event).
Base SQL also have parameters in "where" section, which types are set in designtime.
Is there any way to set TMSQuery.SQL unouched with all types declaration (initial section) and adding additional conditons (e.g. "and Qty > 0")?

Frenk

Posted: Mon 17 Apr 2006 08:46
by Jackson
You can call TCustomDADataSet.AddWhere to add condition to WHERE clause of SELECT statement in SQL property.