Skip to content

SQL-001: Insert a context row

Writes one context key/value pair into the Context table on behalf of clsContext.SaveContext. The method is called once per key held in the in-memory context hashtable, so a single navigation that carries several values (target app, target view, claim ID, etc.) executes this statement multiple times after first clearing prior rows with SQL-004.

Classification

Field Value
SQL ID SQL-001
Operation type Create
Execution method Inline SQL (VB & _ string concatenation), CommandType.Text, ExecuteNonQuery
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.Save

Parameters

Parameter Direction Type Max length Description
@AppName Input SqlDbType.VarChar 50 Owning application name (clsContext.m_ApplicationName) whose context values are being written
@SessionID Input SqlDbType.VarChar 50 ASP.NET session ID supplied by clsControllerBase (m_HttpContext.Session.SessionID)
@ContextName Input SqlDbType.VarChar 50 Context key from the in-memory m_AppVars hashtable — e.g. targetView, targetApp, sourceApp, sourceView, claimId, policyNum, SAIFClaimNum, ProviderLocationSeqNum, __SAIFPID
@ContextValue Input SqlDbType.VarChar 256 Context value, always persisted as a string

Tables

Table Access Columns used
Context INSERT AppName, SessionID, ContextName, ContextValue, UpdateDate (positional; no explicit column list)

Sample SQL

-- Positional insert with no explicit column list; bound to the physical column order of Context
Insert into Context
Values (
  @AppName,
  @SessionID,
  @ContextName,
  @ContextValue,
  CURRENT_TIMESTAMP)

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