Subject RE: [firebird-support] isc_detach_database question
Author Alan McDonald
> Can someone tell me why this code leaves the database connected?
> I know the
> transaction is committed but the server connection does not drop. Is there
> some other call to drop the connection or do I need to loop for a while to
> wait for something?
> thanks
> Alan
>
> function SQLDisconnect( hdbc : PHDBC) : RETCODE;export;
> var
> retval : RETCODE;
> begin
> retval := SQL_SUCCESS;
> if (hdbc^.tx_handle <> nil) then
> isc_commit_transaction(@(hdbc^.status),@(hdbc^.tx_handle));
> isc_detach_database(@(hdbc^.status),@(hdbc^.db_handle));
> FreeMem(hdbc^);
> hdbc^ := nil;
> SQLDisconnect := retval;
> end;
>

hmm, sorry - I'm keeping an events connection open...