---
title: "SQL-005: clsXDeferredPrintCollection.InsertSQL (dead code)"
summary: Inserts a deferred print item — not wired to any live lifecycle method.
status: draft
owner: <owner>
last_reviewed: 2026-07-24
library: SAIF.Services.Printing.Remote
reference_type: package
---

# SQL-005: clsXDeferredPrintCollection.InsertSQL (dead code)

This SQL property defines an `INSERT INTO XDEFERRED_PRINT` statement similar to SQL-004 but at the collection level. The `BeforeInsert` method in `clsXDeferredPrintCollection` is fully commented out, so this SQL is never executed. No live `AddParm` calls exist for this property.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-005 |
| **Operation type** | Create (Insert) |
| **Execution method** | Inline (⚠️ not wired to live `BeforeInsert` method — `BeforeInsert` is fully commented out in this class) |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsXDeferredPrintCollection` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert` (commented out) |

## Parameters

No live `AddParm` calls exist — `BeforeInsert` is fully commented out. Bind variables present in SQL text only (types inferred from column names and sibling SQL-004):

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:CopiesCount` | Input | Decimal* | — | Number of copies to print |
| `:CreateDate` | Input | Date* | — | Date the item was created |
| `:CreateUser` | Input | String* | 30 | Creating user or process |
| `:DocumentDescr` | Input | String* | 60 | Document description |
| `:DuplexCode` | Input | String* | 5 | Duplex printing code |
| `:FileName` | Input | String* | 120 | Source file name |
| `:PrintedDate` | Input | Date* | — | Printed date (nullable) |
| `:Sort0Value`–`:Sort9Value` | Input | String* ×10 | 120 each | Sort/grouping columns |
| `:XMLValueText` | Input | NCLOB* | — | XML payload blob |
| `:XdeferredSeqNum` | Input | Decimal* | — | Primary key |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [XDEFERRED_PRINT](../database-tables.md#xdeferred_print) | INSERT | `COPIES_COUNT`, `CREATE_DATE`, `CREATE_USER`, `DOCUMENT_DESCR`, `DUPLEX_CODE`, `FILE_NAME`, `PRINTED_DATE`, `SORT0_VALUE`–`SORT9_VALUE`, `XML_VALUE_TEXT`, `XDEFERRED_SEQ_NUM` |

## Sample SQL

```sql
INSERT INTO XDEFERRED_PRINT (
    COPIES_COUNT,
    CREATE_DATE,
    CREATE_USER,
    DOCUMENT_DESCR,
    DUPLEX_CODE,
    FILE_NAME,
    PRINTED_DATE,
    SORT0_VALUE,
    SORT1_VALUE,
    SORT2_VALUE,
    SORT3_VALUE,
    SORT4_VALUE,
    SORT5_VALUE,
    SORT6_VALUE,
    SORT7_VALUE,
    SORT8_VALUE,
    SORT9_VALUE,
    XML_VALUE_TEXT,
    XDEFERRED_SEQ_NUM
) VALUES (
    :CopiesCount,
    :CreateDate,
    :CreateUser,
    :DocumentDescr,
    :DuplexCode,
    :FileName,
    :PrintedDate,
    :Sort0Value,
    :Sort1Value,
    :Sort2Value,
    :Sort3Value,
    :Sort4Value,
    :Sort5Value,
    :Sort6Value,
    :Sort7Value,
    :Sort8Value,
    :Sort9Value,
    :XMLValueText,
    :XdeferredSeqNum
)
-- ⚠️ Not invoked — BeforeInsert in this class is fully commented out.
```

> **Note:** Statements marked with `*` were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with `**` could not be confirmed; treat as unknown until verified.

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