Skip to content

SQL-003: Retrieve a single context value by name

Fetches a single context value for a session, keyed by context name. In practice this statement is called only from clsContext.GetPID, with ContextName fixed to ViewPageBase.SAIFPID_NAME (__SAIFPID), to recover the multi-model view ID a postback should rejoin.

Classification

Field Value
SQL ID SQL-003
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(inSessionID, inContextValue)

Parameters

Parameter Direction Type Max length Description
@SessionID Input SqlDbType.VarChar 50 ASP.NET session ID
@ContextName Input SqlDbType.VarChar 50 Context key to fetch; called only with ViewPageBase.SAIFPID_NAME to recover the page/view instance ID

Tables

Table Access Columns used
Context SELECT ContextValue

Sample SQL

Select
  ContextValue
FROM Context
Where SessionID = @SessionID
  and ContextName = @ContextName

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