Subject RE: [IBO] "object %o is in use"-Error because of CacheStatementHandles (firebird 2.0.1)
Author Jason Wharton
Are you calling the DropDatabase method or executing the DROP DATABASE
statement via ExecuteImmediate (script)?

Regarding caching of statement handles. It is just a performance
optimization to help things be less "chatty" on the wire. Over a slow
connection this can make a nice difference. On a very fast LAN it probably
doesn't do a whole lot. It could also be a problem if there are many
clients and each instance ties up server resources by holding handles in a
cache needlessly.

Jason

> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of Andreas Filsinger
> Sent: Friday, May 11, 2007 8:06 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] "object %o is in use"-Error because of
> CacheStatementHandles (firebird 2.0.1)
>
>
> (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.
>
> -----------------------------------
>
> # can somebody tell me the meaning of the Handles-Cache? How do it
> helps, is it about performace or something?
> # how can i release the schema-cache, so before any "drop" i can
> clear the cache, or any suggestions for a better fix.
>
> Thanks for your work!
> Andreas
>
>
>
>
>