/// <summary> /// Open a new cursor on the table. /// </summary> /// <param name="record">The record that is opening the tableid.</param> /// <returns>A new JET_TABLEID for the record.</returns> /// <remarks> /// Records that open a JET_TABLEID will be disposed when the table /// is closed. /// </remarks> public Cursor OpenCursorForRecord(RecordBase record) { Cursor cursor = this.OpenCursor(); this.recordsWithOpenCursor.Add(record); record.CursorClosedEvent += this.OnRecordClose; return(cursor); }
/// <summary> /// Called when a record that has opened its own tableid is closed. /// </summary> /// <param name="record">The record being closed.</param> private void OnRecordClose(RecordBase record) { record.CursorClosedEvent -= this.OnRecordClose; this.recordsWithOpenCursor.Remove(record); }
/// <summary> /// Open a new cursor on the table. /// </summary> /// <param name="record">The record that is opening the tableid.</param> /// <returns>A new JET_TABLEID for the record.</returns> /// <remarks> /// Records that open a JET_TABLEID will be disposed when the table /// is closed. /// </remarks> public Cursor OpenCursorForRecord(RecordBase record) { Cursor cursor = this.OpenCursor(); this.recordsWithOpenCursor.Add(record); record.CursorClosedEvent += this.OnRecordClose; return cursor; }