Page 1 of 1

EIBC Error - Invalid statemen handle

Posted: Mon 05 May 2014 23:51
by mariusz
Hi there...

I have written quite large project witch uses IBDAC. My previous compilation (the last that works) was done with IBDAC version 5.2.5. Now I updated version to the newest 5.3.7, compiled my project without changing anything and found surprising errors.
My application brakes down with error message EIBC Error - "Invalid statement handle" somewhere in the application code on simple, stupid select.

Code: Select all

select null id_promocja,'Brak' nazwa_promocji,null obowiazuje_od,null obowiazuje_do,null id_promocja_typ from rdb$database

union all

select distinct * from
(
select p.id_promocja, p.nazwa_promocji, p.obowiazuje_od, p.obowiazuje_do, p.id_promocja_typ
from promocja p
where p.id_kraj=:id_kraj and :DATA_WYSYLKI_OCZEKIWANA between p.obowiazuje_od and p.obowiazuje_do

union all

select p.id_promocja, p.nazwa_promocji, p.obowiazuje_od, p.obowiazuje_do, p.id_promocja_typ
from promocja p
where p.id_promocja=:id_promocja
)
order by 2
:ID_KRAJ(VARCHAR[0],IN)=<NULL> 
:DATA_WYSYLKI_OCZEKIWANA(DATE,IN)=<NULL> 
:ID_PROMOCJA(INTEGER,IN)=<NULL>
If I commented this query opening, error message comes couple lines further on another simple query

Code: Select all

select r.id_reklama, t.tytul_nazwa, r.kod, r.data_wydania, r.data_waznosci,
  case when current_date between r.data_wydania and r.data_waznosci then 1
  else 0
  end obowiazujaca
from reklama r
left join tytuly t on t.id_tytuly=r.id_tytuly
where (r.id_kraj = :id_kraj and :DATA_ZAMOWIENIA between r.data_wydania and r.data_waznosci)or(r.id_reklama = :ID_REKLAMA)
order by r.kod
:ID_KRAJ(VARCHAR[2],IN)='PL'
:DATA_ZAMOWIENIA(DATE,IN)=2014-05-06
:ID_REKLAMA(INTEGER,IN)=205
Obviously, this queries run separately does not cause problems - it's something more complicated.

My computer is Win 7 pro 64 (I tried application also on Win 7 pro x86 and on another Win 7 pro x64). My Delphi is XE2. Firebird server is 2.5.2. My client library is 2.5.2.26540.

Could you please help me with finding reason and solution?

Re: EIBC Error - Invalid statemen handle

Posted: Tue 06 May 2014 08:20
by ZEuS
Unfortunately, we can not reproduce the problem. The provided query itself does not cause any errors.
Please, create a small test project that demonstrates the problem, including a sample database, and send it to eugeniyz*devart*com. Also, specify the exact version of the IDE and the Firebird server you are using.

Re: EIBC Error - Invalid statemen handle

Posted: Tue 06 May 2014 11:28
by mariusz
Sorry, but it's hardly possible. Database has almost 1GB and is stored on my customer server. Also making app sample can be a problem, because part that causes problems is deep in the structure. I can send you SQL monitor log for testing, but without database access you will do nothing.

I can propose you to arrange remote session to my developer machine (at any time you want). We can use Skype and TeamViewer.

Re: EIBC Error - Invalid statemen handle

Posted: Fri 04 Jul 2014 11:34
by PavloP
Unfortunately, we cannot investigate the problem without a test project. Company policy disallows us to use Skype or TeamViewer for access to our clients' computers. Try to reproduce the problem in a separate project and send it to us for investigation.