Select SQL

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Frenk

Select SQL

Post by Frenk » Sat 15 Apr 2006 09:12

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

Jackson
Posts: 512
Joined: Thu 26 Jan 2006 10:06

Post by Jackson » Mon 17 Apr 2006 08:46

You can call TCustomDADataSet.AddWhere to add condition to WHERE clause of SELECT statement in SQL property.

Post Reply