internal void Dispose()
        {
            int num;

            this.ResetValues();
            UnsafeNativeMethods.IAccessor accessor = this._iaccessor;
            IntPtr hAccessor = this._accessorHandle;

            this._iaccessor      = null;
            this._accessorHandle = ODB.DB_INVALID_HACCESSOR;
            if (((ODB.DB_INVALID_HACCESSOR != hAccessor) && (accessor != null)) && (accessor.ReleaseAccessor(hAccessor, out num) < OleDbHResult.S_OK))
            {
                SafeNativeMethods.Wrapper.ClearErrorInfo();
            }
            base.Dispose();
        }
Пример #2
0
        internal new void Dispose()
        {
            ResetValues();

            UnsafeNativeMethods.IAccessor iaccessor = _iaccessor;
            IntPtr accessorHandle = _accessorHandle;

            _iaccessor      = null;
            _accessorHandle = ODB.DB_INVALID_HACCESSOR;

            if ((ODB.DB_INVALID_HACCESSOR != accessorHandle) && (null != iaccessor))
            {
                OleDbHResult hr;
                int          refcount;
                hr = iaccessor.ReleaseAccessor(accessorHandle, out refcount);
                if (hr < 0)
                { // ignore any error msgs
                    SafeNativeMethods.Wrapper.ClearErrorInfo();
                }
            }

            base.Dispose();
        }