public override void Detach()
    {
        try
        {
            _database.Xdr.Write(IscCodes.op_service_detach);
            _database.Xdr.Write(Handle);
            _database.Xdr.Write(IscCodes.op_disconnect);
            _database.Xdr.Flush();

            Handle = 0;
        }
        catch (IOException ex)
        {
            throw IscException.ForIOException(ex);
        }
        finally
        {
            try
            {
                _connection.Disconnect();
            }
            catch (IOException ex)
            {
                throw IscException.ForIOException(ex);
            }
            finally
            {
                _database   = null;
                _connection = null;
            }
        }
    }
Esempio n. 2
0
 public void CloseConnection()
 {
     _connection.Disconnect();
 }