/// <summary> /// Sets current position of recDataAccess.Record based on the input parameter record bookmark /// </summary> /// <param name="dataError">Determines whether to throw in case the bookmark is not valid.</param> /// <param name="bookmark">Bookmark of the record. Must not be null.</param> internal override void SetPosition(DataError dataError, byte[] bookmark) { if (bookmark == null) { throw new ArgumentNullException("bookmark"); } Debug.Assert(this.Record != null); NavRecordId recordId = new NavRecordId(bookmark); if (this.Record.ALRecordId != recordId) { if (this.Record.ALCurrentKeyIndex == NavKeyRef.ALPrimaryKeyIndex && dataError == DataError.TrapError) { if (!this.Record.ALGet(dataError, recordId)) { this.Record.SetPrimaryKeyFieldValues(recordId); } } else { this.Record.ALGet(dataError, recordId); } } }