Subject RE: [IBO] TIB_Query and SQL Statements, Off-topic
Author Alan McDonald
this won't work in a TIB_Query. You need to do the same in delphi code where
you clear and re-assign the IB_Query.SQLWhere string list.
and the like clause neeeds to be '%string%' i.e. don't concatenate them,
create them.
I thi8nk you'll also need to use the beginupdate, endupdate calls around
your re-assignment so the query doesn't act on the change til your finished.

-----Original Message-----
From: David Husarik [mailto:davidhusarik@...]
Sent: Saturday, 8 March 2003 10:13 AM
To: ibobjects
Subject: [IBO] TIB_Query and SQL Statements, Off-topic

Hi Group;

Is it possible to setup the SQL statement in a
TIB_Query component as follows.

aNumber = :theNumber

if (aNumber = 1) then
select * from table_A where ID = :ID
if (aNumber = 2) then
select * from table_A where NAME LIKE
if (aNumber = 3) then
select * from table_A where CITY LIKE

Is this statement valid?
Another question, is this the correct syntax for a
like statement. I have used this syntax in stored
procedures and it seems to work about 50% of the time.
Sometimes I get the results I expect other times I do

David Husarik

Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more

IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________ - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !

Your use of Yahoo! Groups is subject to