Beispiel #1
0
 public void SetActiveCursor(ServerCursor activeCursor)
 {
     if (_activeCursor != null)
     {
         throw new ServerException(ServerException.Codes.PlanCursorActive);
     }
     _activeCursor = activeCursor;
     //FProcess.SetActiveCursor(FActiveCursor);
 }
Beispiel #2
0
        public IServerCursor Open(DataParams paramsValue)
        {
            IServerCursor serverCursor;
            //ServerProcess.RaiseTraceEvent(TraceCodes.BeginOpenCursor, "Begin Open Cursor");
            Exception exception    = null;
            int       nestingLevel = _process.BeginTransactionalCall();

            try
            {
                CheckCompiled();

                                #if TIMING
                DateTime startTime = DateTime.Now;
                System.Diagnostics.Debug.WriteLine(String.Format("{0} -- ServerExpressionPlan.Open", DateTime.Now.ToString("hh:mm:ss.ffff")));
                                #endif
                ServerCursor cursor = new ServerCursor(this, _program, paramsValue);
                try
                {
                    cursor.Open();
                                        #if TIMING
                    System.Diagnostics.Debug.WriteLine(String.Format("{0} -- ServerExpressionPlan.Open -- Open Time: {1}", DateTime.Now.ToString("hh:mm:ss.ffff"), (DateTime.Now - startTime).ToString()));
                                        #endif
                    serverCursor = (IServerCursor)cursor;
                }
                catch
                {
                    Close((IServerCursor)cursor);
                    throw;
                }
            }
            catch (Exception E)
            {
                if (Header != null)
                {
                    Header.IsInvalidPlan = true;
                }

                exception = E;
                throw WrapException(E);
            }
            finally
            {
                _process.EndTransactionalCall(nestingLevel, exception);
            }
            //ServerProcess.RaiseTraceEvent(TraceCodes.EndOpenCursor, "End Open Cursor");
            return(serverCursor);
        }
Beispiel #3
0
 public void ClearActiveCursor()
 {
     _activeCursor = null;
     //FProcess.ClearActiveCursor();
 }
 public RemoteServerCursor(RemoteServerExpressionPlan plan, ServerCursor serverCursor) : base()
 {
     _plan         = plan;
     _serverCursor = serverCursor;
     AttachServerCursor();
 }