---
title: "SQL-023: clsXPrintControlCollection.DeleteSQL"
summary: Deletes a print-control batch header by primary key — collection-level variant.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Services.Printing.Remote
reference_type: package
---

# SQL-023: clsXPrintControlCollection.DeleteSQL

Deletes a single row from `XPRINT_CONTROL` by its primary key (`XPRINT_CONTROL_SEQ_NUM`). This is the collection-level delete path for `clsXPrintControlCollection.BeforeDelete`. The SQL text is identical to SQL-022 but is defined in the collection class. Post-delete contention is detected by `AfterDelete` per [BR-001](../business-rules.md#br-001-row-count-contention-check).

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-023 |
| **Operation type** | Delete |
| **Execution method** | Inline |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsXPrintControlCollection` |
| **Criteria property** | `DeleteSQL` |
| **Lifecycle method** | `BeforeDelete` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:XprintControlSeqNum` | Input | Decimal | — | Primary key of the batch header row to delete |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [XPRINT_CONTROL](../database-tables.md#xprint_control) | DELETE | `XPRINT_CONTROL_SEQ_NUM` |

## Sample SQL

```sql
Delete XPRINT_CONTROL
Where
    XPRINT_CONTROL.XPRINT_CONTROL_SEQ_NUM = :XprintControlSeqNum
```

## Business rules
- [BR-001: Row-count contention check](../business-rules.md#br-001-row-count-contention-check)

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

## Sources
- `Services\SAIF.Services.Printing.Remote\clsXPrintControlCollection.vb`
