Пример #1
0
 protected override void Dispose(bool ADisposing)
 {
     if (FCursor != null)
     {
         try
         {
             FCursor.Dispose();
         }
         finally
         {
             FCursor = null;
             FRecord = null;
         }
     }
     base.Dispose(ADisposing);
 }
Пример #2
0
        /// <summary> Closes the current reader and examines the EOF and server cursor handle output parameters. </summary>
        private void CloseAndProcessFetchResult()
        {
            FCursor.Dispose();
            FCursor = null;

            switch ((int)((MSSQLCommand)FCommand).GetParameterValue("@retval"))
            {
            case 16: FEOF = true; break;

            case 0: FEOF = false; break;

            default: throw new ConnectionException(ConnectionException.Codes.UnableToOpenCursor);
            }

            if (FCursorHandle == 0)
            {
                MSSQLCommand LCommand = (MSSQLCommand)FCommand;
                LCommand.ParametersAreAvailable();                      // Indicate to the command that now is the time to read any output (user) parameters
                FCursorHandle = (int)LCommand.GetParameterValue("@cursor");
            }
        }