i have this query into a UniQuery component:
Code: Select all
if :TipoBusqueda = 'OP1'
begin
Select data1..c1, data1..c2, data4..c9
from data1, data2
where
data4..c1 = data1..c1
and data1..c1 like :ID
and data1..c6 *= :CLI
.
.
....
end
else
begin
if exists (select * from data1..c1 where data1..c1 like :ID and data1..c6 like :RSC )
begin
Select data1..c1, data1..c2, data2..c3
from data1, data2
where
data2..c1 = data2..c1
and data1..c1 like :ID
.
.
....
end
else
begin
Select data1..c1, data1..c2, data3..c5
from data1, data3
where
data3..c1 = data1..c1
and data1..c1 like :ID
.
.
....
end
end

but when the query is executed using BDE don't have any problem..
i think the proble are on the IF statement... but i don't knok how solve into the component... and need that the statement stay into the component....
When execute the query without the IF statement don't have any error....
on this moment we are migrating our App from Delphi 6 with BDE to Delphi 6 with UniDAC.
i use:
Delphi 6 up 2
Unidac 5.2.7
ASE 12.5.4
somebody can help me
thanks so much
sorry for my bad english