'invalid database handle (no active connection)'

Hi Gurus!

I'm experiencing very strange problem. I've created dll for interbase
connection, and in initialization section I've putted DataModule.Create and
OnCreate -> ibDatabase.Connected := True; Logically, in finalization section
I've tried to put DataModule.Free and OnDestroy -> ibDatabase.Connected :=
False, and that is the place where I'm receiving message from subject.
D6, IB 5.6.

Can somebody help me with these strange problem?

Thanks in advance
Aleksandar