Skip to content

SQL-004: Delete context rows

Removes every context row for a given application and session. clsContext.SaveContext calls this first to make the subsequent insert set (SQL-001) a full replace rather than a merge; clsContext.RetrieveContext calls it immediately after reading rows (SQL-002) so a cross-application hand-off is consumed exactly once.

Classification

Field Value
SQL ID SQL-004
Operation type Delete
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.Delete

Parameters

Parameter Direction Type Max length Description
@AppName Input SqlDbType.VarChar 50 Application whose rows are purged
@SessionID Input SqlDbType.VarChar 50 ASP.NET session ID

Tables

Table Access Columns used
Context DELETE AppName, SessionID

Sample SQL

-- Oracle-style DELETE without FROM; the target table is the identifier immediately following Delete
Delete Context
Where
  AppName = @AppName
  and SessionID = @SessionID

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