Component File /DBUtil/YOleDbAdapter.cs (C#)
using System;  
using System.Data.OleDb;  
  
namespace YariSoft.DBUtil  
{  
    public class YOleDbAdapter  
    {  
        private OleDbDataAdapter _adapter = null;  
        private OleDbCommandBuilder _builder = null;  
  
        public OleDbDataAdapter DataAdapter  
        {  
            get{ return this._adapter; }  
        }  
  
        public YOleDbAdapter( OleDbDataAdapter Adapter, OleDbCommandBuilder CommandBuilder )  
        {  
            this._adapter = Adapter;  
            this._builder = CommandBuilder;  
        }  
  
        ~YOleDbAdapter()  
        {  
            this.Dispose();  
        }  
  
        public void Dispose()  
        {  
            if( this._builder != null ){  
                this._builder.Dispose();  
            }  
            if( this._adapter != null ){  
                this._adapter.Dispose();  
            }  
        }  
    }  
}