Example #1
0
        /// <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);
        }
Example #2
0
 /// <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);
 }
Example #3
0
 /// <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);
 }
Example #4
0
        /// <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;
        }