Board index » delphi » TQuery SQL Problem

TQuery SQL Problem

Does anyone know if there is a limit to the total length of the TQuery.SQL property ?

I'm working on a general inquiry panel that allows the user to build his/her own
query, and when I try to add the user's conditions to the WHERE clause, characters
seem to get added up to a point, and then subsequent ADD's do nothing.

Here's how it works:

1) The user selects the fields, comparison operators, and values from comboboxes. The
comparison operators are displayed in English, not with symbols. Selections are
stored a TMEMO.

2) When the user clicks OK, the TMemo is passed to another form that does the
parsing, builds the SQL, and opens the query. Results of the query are displayed in a
TDBGRID object. The parser actually does the QUERY1.SQL.ADD's.

Any info would be greatly appreciated.

  John Laing

John Laing


Re:TQuery SQL Problem

The SQL property is of class TStrings which
is a collection of Pascal strings (255 chars max each).

If your statement exceeds this length, it will be truncated.


Other Threads