internal int AllocateForAccessor(OleDbDataReader dataReader, int indexStart, int indexForAccessor)
 {
     System.Data.OleDb.RowBinding binding = System.Data.OleDb.RowBinding.CreateBuffer(this._count, this._dataBufferSize, this._needToReset);
     this._rowBinding = binding;
     ColumnBinding[] bindingArray = binding.SetBindings(dataReader, this, indexStart, indexForAccessor, this._parameters, this._dbbindings, this._ifIRowsetElseIRow);
     this._columnBindings = bindingArray;
     if (!this._ifIRowsetElseIRow)
     {
         for (int i = 0; i < bindingArray.Length; i++)
         {
             this._dbcolumns[i].pData = binding.DangerousGetDataPtr(bindingArray[i].ValueOffset);
         }
     }
     return (indexStart + bindingArray.Length);
 }
 internal ColumnBinding(OleDbDataReader dataReader, int index, int indexForAccessor, int indexWithinAccessor, OleDbParameter parameter, System.Data.OleDb.RowBinding rowbinding, System.Data.OleDb.Bindings bindings, tagDBBINDING binding, int offset, bool ifIRowsetElseIRow)
 {
     this._dataReader = dataReader;
     this._rowbinding = rowbinding;
     this._bindings = bindings;
     this._index = index;
     this._indexForAccessor = indexForAccessor;
     this._indexWithinAccessor = indexWithinAccessor;
     if (parameter != null)
     {
         this._parameter = parameter;
         this._parameterChangeID = parameter.ChangeID;
     }
     this._offsetStatus = binding.obStatus.ToInt32() + offset;
     this._offsetLength = binding.obLength.ToInt32() + offset;
     this._offsetValue = binding.obValue.ToInt32() + offset;
     this._ordinal = binding.iOrdinal.ToInt32();
     this._maxLen = binding.cbMaxLen.ToInt32();
     this._wType = binding.wType;
     this._precision = binding.bPrecision;
     this._ifIRowsetElseIRow = ifIRowsetElseIRow;
     this.SetSize(this.Bindings.ParamSize.ToInt32());
 }
Exemplo n.º 3
0
 internal ColumnBinding(OleDbDataReader dataReader, int index, int indexForAccessor, int indexWithinAccessor, OleDbParameter parameter, System.Data.OleDb.RowBinding rowbinding, System.Data.OleDb.Bindings bindings, tagDBBINDING binding, int offset, bool ifIRowsetElseIRow)
 {
     this._dataReader          = dataReader;
     this._rowbinding          = rowbinding;
     this._bindings            = bindings;
     this._index               = index;
     this._indexForAccessor    = indexForAccessor;
     this._indexWithinAccessor = indexWithinAccessor;
     if (parameter != null)
     {
         this._parameter         = parameter;
         this._parameterChangeID = parameter.ChangeID;
     }
     this._offsetStatus      = binding.obStatus.ToInt32() + offset;
     this._offsetLength      = binding.obLength.ToInt32() + offset;
     this._offsetValue       = binding.obValue.ToInt32() + offset;
     this._ordinal           = binding.iOrdinal.ToInt32();
     this._maxLen            = binding.cbMaxLen.ToInt32();
     this._wType             = binding.wType;
     this._precision         = binding.bPrecision;
     this._ifIRowsetElseIRow = ifIRowsetElseIRow;
     this.SetSize(this.Bindings.ParamSize.ToInt32());
 }
 public void Dispose()
 {
     this._parameters = null;
     this._dataReader = null;
     this._columnBindings = null;
     System.Data.OleDb.RowBinding binding = this._rowBinding;
     this._rowBinding = null;
     if (binding != null)
     {
         binding.Dispose();
     }
 }