Subject IBO and union (problem)
Author Carlos
Hi !

Just to inform about a possible problem with IBO...

In the following TIBOQuery :

select p.Cod_MatBibl, e.Num_Ex, p.Per_Titulo, e.Per_Volume,
e.Per_Fasc, e.Per_MesPub, e.Per_AnoPub
from Periodic p
left outer join Exemplar e on (p.Cod_MatBibl=e.Cod_MatBibl)
where ((e.Ex_IndEtiq='S') and (P.Cod_Matbibl >= :inicio) and (P.Cod_Matbibl <= :fim))
union
select cast (9999999 as integer) as Cod_MatBibl,
cast(0 as smallint) as Num_ex,
f_strblob(' ') as Per_Titulo,
cast(0 as smallint) as Per_Volume,
cast('' as varchar(10)) as Per_Fasc,
cast('' as char(3)) as Per_MesPub,
cast(0 as smallint) as Per_AnoPub
from rdb$database

when I Open the query I get :

SQL error code = - 104
count of column list and variable list do not match

To make it work I had to set the AutoFetchAll to true OR set
RecordCountAccurate to false.

[]s

Carlos
WarmBoot Informatica - http://www.warmboot.com.br
Interbase-BR - http://www.interbase-br.com