예제 #1
0
 public override int GetOrdinal(string name)
 {
     this.AssertReaderIsOpen("GetOrdinal");
     this.AssertReaderHasColumns();
     if (this._fieldNameLookup == null)
     {
         this._fieldNameLookup = new System.Data.ProviderBase.FieldNameLookup(this, -1);
     }
     return(this._fieldNameLookup.GetOrdinal(name));
 }
예제 #2
0
        public override bool NextResult()
        {
            bool   flag;
            IntPtr ptr;

            Bid.ScopeEnter(out ptr, "<ora.OracleDataReader.NextResult|API> %d#\n", this.ObjectID);
            try
            {
                this.AssertReaderIsOpen("NextResult");
                this._fieldNameLookup = null;
                this._schemaTable     = null;
                flag = this.NextResultInternal();
            }
            finally
            {
                Bid.ScopeLeave(ref ptr);
            }
            return(flag);
        }
예제 #3
0
        public override void Close()
        {
            IntPtr ptr;

            Bid.ScopeEnter(out ptr, "<ora.OracleDataReader.Close|API> %d#\n", this.ObjectID);
            try
            {
                OciHandle.SafeDispose(ref this._statementHandle);
                this.Cleanup();
                if (this._refCursorDataReaders != null)
                {
                    int length = this._refCursorDataReaders.Length;
                    while (--length >= 0)
                    {
                        OracleDataReader reader = this._refCursorDataReaders[length];
                        this._refCursorDataReaders[length] = null;
                        if (reader != null)
                        {
                            reader.Dispose();
                        }
                    }
                    this._refCursorDataReaders = null;
                }
                if (this._closeConnectionToo && (this._connection != null))
                {
                    this._connection.Close();
                }
                this._connection      = null;
                this._fieldNameLookup = null;
                this._schemaTable     = null;
            }
            finally
            {
                Bid.ScopeLeave(ref ptr);
            }
        }
 public override bool NextResult()
 {
     bool flag;
     IntPtr ptr;
     Bid.ScopeEnter(out ptr, "<ora.OracleDataReader.NextResult|API> %d#\n", this.ObjectID);
     try
     {
         this.AssertReaderIsOpen("NextResult");
         this._fieldNameLookup = null;
         this._schemaTable = null;
         flag = this.NextResultInternal();
     }
     finally
     {
         Bid.ScopeLeave(ref ptr);
     }
     return flag;
 }
 public override int GetOrdinal(string name)
 {
     this.AssertReaderIsOpen("GetOrdinal");
     this.AssertReaderHasColumns();
     if (this._fieldNameLookup == null)
     {
         this._fieldNameLookup = new System.Data.ProviderBase.FieldNameLookup(this, -1);
     }
     return this._fieldNameLookup.GetOrdinal(name);
 }
 public override void Close()
 {
     IntPtr ptr;
     Bid.ScopeEnter(out ptr, "<ora.OracleDataReader.Close|API> %d#\n", this.ObjectID);
     try
     {
         OciHandle.SafeDispose(ref this._statementHandle);
         this.Cleanup();
         if (this._refCursorDataReaders != null)
         {
             int length = this._refCursorDataReaders.Length;
             while (--length >= 0)
             {
                 OracleDataReader reader = this._refCursorDataReaders[length];
                 this._refCursorDataReaders[length] = null;
                 if (reader != null)
                 {
                     reader.Dispose();
                 }
             }
             this._refCursorDataReaders = null;
         }
         if (this._closeConnectionToo && (this._connection != null))
         {
             this._connection.Close();
         }
         this._connection = null;
         this._fieldNameLookup = null;
         this._schemaTable = null;
     }
     finally
     {
         Bid.ScopeLeave(ref ptr);
     }
 }