Subject Re: [IBO] Re: TIBOQuery Master-Detail isn't working anymore
Author Daniel Rail

At Wednesday, February 04, 2009, 7:52 PM, Antonio Carlos Ribeiro wrote:

> Based on your explanation I made another master-detail relation work
> correctly and after that, with a path, I discovered the problem: I'm
> not allowed to change the SQL on a BeforeOpen event. My application
> has some procedures that (re)writes application main sql queries, so,
> yes I'm dumb, I've made a routine to fix those, now forbidden,
> 'aliasesless' SQL queries, and where's the best place to assure that a
> SQL is righly written? Just before open it, of course! I didn't
> thought IBO would not accept it.

Try the OnPrepareSQL event. So basically, you'll have to make sure
that the query gets unprepared, before calling open. You can also
call TIBOQuery.InvalidateSQL, which should trigger a reprepare and and
call the OnPrepareSQL event.

Best regards,
Daniel Rail
Senior Software Developer
ACCRA Solutions Inc. (
ACCRA Med Software Inc. (