Subject Re: [IBO] AV on datamodul
Author Lucas Franzen
Geoff,

> > in one project I keep on getting AV's in IBObjects.dpl.
> > This occurs ALWAYS when opening the Query Editor of any
> > IB_Query (or IB_StoredProc) on a certain datamodul (which
> > is not the main datamodule!) and leaving it with OK.
> > Afterwards I can open and close the editor without any
> > problem.
>
> Are there dependancies between this datamodule and another form or
> datamodule which is not open/activated? (Perhaps it is looking for
> the connection on a module that has not been loaded.)

of course there are dependencies. A lot of forms are referencing this
datamodule (having the TIB_DataSources pointing to Queries on this
module...)
The datamodule itself does just reference the main datamodul (where the
connection and most of the transactions are) and a formless unit (just
some functions) in the implementation part,
in the interface part there's nothing special.

The main datamodul is the first unit created in the project and it's
(old habit) always the first opened unit in the IDE.

>
> Do you still get the error if the datamodule/form that is required is
> openned first? That is; Open the main datamodule (or whatever) AND
> THEN open this other datamodule and try bringing up the editor.

This didn't help anything.
But I found out that I can even reproduce this error when simply trying
to Prepare the query in the Object Inspector; Preparing it in the
QueryEditor will work without problem (but then the AV occurs when
closing the editor with OK...)

> I know I sometimes have problems in this regard, but then I have a
> fairly complex set of interdependant packages and I think it confuses
> Delphi :-)

There aren't too much packages in this app ....

Any more ideas?

Luc.