Skip to content

SQL-002: Retrieve inbound context rows

Reads every context row a source application saved for the current session, filtered to exclude rows the current application wrote itself. Called by clsContext.RetrieveContext, which is invoked from clsControllerBase.CheckContext only when the request's referrer application differs from the current application.

Classification

Field Value
SQL ID SQL-002
Operation type Read
Execution method Inline SQL (VB & _ string concatenation), CommandType.Text, SqlDataAdapter.Fill
Database SQL Server
Schema [unqualified]**
Command type Text
Business object clsContext.clsContextRepository
Criteria property N/A — not a BOF IBusinessCriteria object; SQL is held in the private clsSQL helper class
Lifecycle method clsContextRepository.Retrieve(SourceAppName, CurrentAppName, inSessionID)

Parameters

Parameter Direction Type Max length Description
@AppName Input SqlDbType.VarChar 50 Source application whose context rows are being handed over
@SessionID Input SqlDbType.VarChar 50 ASP.NET session ID
@CurrentApp Input SqlDbType.VarChar 50 Current application name; rows written by the current app are excluded via not AppName = @CurrentApp

Tables

Table Access Columns used
Context SELECT ID, AppName, SessionID, ContextName, ContextValue, UpdateDate

Sample SQL

SELECT
  ID,
  AppName,
  SessionID,
  ContextName,
  ContextValue,
  UpdateDate
FROM Context
WHERE AppName = @AppName
  and SessionID = @SessionID
  and not AppName = @CurrentApp

Operations and processes

Business rules

Note: Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Presentation.Web.MVC/clsContext.vb