{if} directive spanning lines in UniQuery

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jlund
Posts: 22
Joined: Wed 17 Nov 2004 18:50

{if} directive spanning lines in UniQuery

Post by jlund » Thu 06 Aug 2009 09:01

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

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 07 Aug 2009 07:27

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.

Post Reply