/// <include file='doc\OracleDataReader.uex' path='docs/doc[@for="OracleDataReader.GetOrdinal"]/*' /> public int GetOrdinal(string name) { AssertReaderIsOpen(); if (null == _fieldNameLookup) { if (null == _columnInfo) { throw ADP.NoData(); } _fieldNameLookup = new FieldNameLookup(this, -1); } return(_fieldNameLookup.GetOrdinal(name)); }
private void Cleanup() { // release everything; we can't do anything from here on out. if (null != _buffer) { _buffer.Dispose(); _buffer = null; } if (null != _schemaTable) { _schemaTable.Dispose(); _schemaTable = null; } _fieldNameLookup = null; if (null != _columnInfo) { // Only cleanup the column info when it's not the data reader // that owns all the ref cursor data readers; if (null == _refCursorDataReaders) { int i = _columnInfo.Length; while (--i >= 0) { if (null != _columnInfo[i]) { _columnInfo[i].Dispose(); _columnInfo[i] = null; } } } _columnInfo = null; } }