Subject Re: [IBO] "object %o is in use"-Error because of CacheStatementHandles (firebird 2.0.1)
Author Helen Borrie
At 01:06 AM 12/05/2007, you wrote:
>(IBO 4.7.16)
>
>Hi Helen,
>Hi Jason,
>Dear Group,
>
>I never came in contact with the property "CacheStatementHandles" of
>the IB_Connection-Object before - today i did. By migrating to
>firebird 2.0.1 there came up an error wich never was seen in
>firebird<=1.5.
>
>Here is what i do:
>
>: create table CLUB$2101 (RID DOM_REFERENCE NOT NULL)
>: alter table CLUB$2101 add constraint PK_CLUB$2101 primary key (RID)
><# some IBO-Schema Caching Code here #>
>: INSERT INTO CLUB$2101 ( RID) VALUES (7304393)
>: select AUFTRAG.RID from AUFTRAG join CLUB$2101 on
>(CLUB$2101.RID=AUFTRAG.RID) where (NUMMER is null)
>ORDER BY STRASSE ASC
> , ZAEHLER_NUMMER ASC
> , ART ASC
><# some IBO-Schema Caching Code here #>
>: drop table CLUB$2101
>
>with IB_Connection. ...
>
>CacheStatementHandles=false
>
>-> all works fine. Here is the log:
>http://orgamon.com/SQL.log.CacheStatementHandles_false.txt
>
>CacheStatementHandles=true [default of IBO]
>
>-> the last "drop" Statement fails because it uses the same statement-
>Handle as the "Schema Caching Code" OR the "Schema Caching Code" is
>NOT closed completely. The Error Msg from firebird is OK, beause
>CLUB$2101 is a living member of the not fully closed Schema-Query
>before the drop.

No, the last statement fails because you have a cursor open on the
table you are trying to drop. - that's what is meant by "Object in Use".

Helen