Page 1 of 1

{if} directive spanning lines in UniQuery

Posted: Thu 06 Aug 2009 09:01
by jlund
Hi

How can I make the {if} directive span more lines in TUniQuery

The statements
UniQuery1.SQL.Add('SELECT * FROM Table1 WHERE'); UniQuery1.SQL.Add('{if MySQL'}');
UniQuery1.SQL.Add('Field1=0');
UniQuery1.SQL.Add('{else'}');
UniQuery1.SQL.Add('Field1=1');
UniQuery1.SQL.Add('{endif'}');
fails, but
UniQuery1.SQL.Add('SELECT * FROM Table1 WHERE'); UniQuery1.SQL.Add('{if MySQL'}field1=0{else}field1=1{endif}');
works well.

My SQL statements are way more complicated, so writing everything
in one line is annoying.

TIA Jens Lund

Posted: Fri 07 Aug 2009 07:27
by Plash
We could not reproduce the problem. Please send to support*devart*com a complete small sample that demonstrates the problem, including the script for creating database objects.