Subject Re: [IBO] Connection not closing
Author Helen Borrie
At 06:24 PM 1/06/2005 +0000, you wrote:
>Hi All,
>
>What would prevent a TIB_Connection for closing?

A transaction that is still running and is not read to roll
back? Typically, a SELECT query hasn't finished fetching all of the
requested rows.


>My code is like this:
>DM.dbXm.Connected := False; // not working
>Result := (not DM.dbXm.Connected);
>
>where DM is a TDataModule and dbXm is a TIB_Connection. After setting
>connected to False, the connected property still reads true. I've
>also tried the following:
>
>DM.dbXm.Close;
>DM.dbXm.Disconnect;
>
>Nothing seems to close the connection.

You'll see this "phenomenon" if you are holding open a select query on a
very large dataset and the application hasn't fetched to the last row since
Refresh was last called. In the "wind-down" triggered off by Disconnect,
IBO will continue to wait until the fetches are finished, at which point it
is possible for the destructor to either commit or roll back the transaction.

Helen