---
title: "SQL-005: Insert application code"
summary: Inserts a new record into BUSONLINE_APPS_CODE.
status: draft
owner: SAIF
last_reviewed: 2026-07-24
library: SAIF.Business.Menu
reference_type: package
---

# SQL-005: Insert application code

Inserts a new application code record into `BUSONLINE_APPS_CODE`. Note: the source SQL text contains a column/value count mismatch (3 columns vs 4 values) and references `:CodeDescr` while `BeforeInsert` binds `ApplicationPath` — a source-level anomaly documented in the DB analysis.

## Classification

| Field | Value |
| --- | --- |
| **SQL ID** | SQL-005 |
| **Operation type** | Create |
| **Execution method** | Inline SQL |
| **Database** | Oracle |
| **Schema** | `[unqualified]**` |
| **Command type** | Text |
| **Business object** | `clsApplicationCode` |
| **Criteria property** | `InsertSQL` |
| **Lifecycle method** | `BeforeInsert` / `AfterInsert` |

## Parameters

| Parameter | Direction | Type | Max length | Description |
| --- | --- | --- | --- | --- |
| `:Code` | Input | String** | 5 | Application code key bound from `Code`. |
| `:ApplicationPath` | Input | String** | 65 | Application path/description bound from `ApplicationPath`. |
| `:ActiveFlag` | Input | String** | 1 | Active status bound from `IsActive.ToY_N_String`. |

## Tables

| Table | Access | Columns used |
| --- | --- | --- |
| [BUSONLINE_APPS_CODE](../database-tables.md#busonline-apps-code) | INSERT | `CODE`, `CODE_DESCR`, `ACTIVE_CODE` |

## Sample SQL

```sql
Insert into BUSONLINE_APPS_CODE ( CODE, CODE_DESCR, ACTIVE_CODE  )
Values ( :Code, :CodeDescr, :ApplicationPath, :ActiveFlag)
```

## Operations and processes
- [Application code scoping](../operations/application-code-scoping.md)


## Business rules
- [BR-MNU-02: DML row-count enforcement](../business-rules.md#br-mnu-02-dml-row-count-enforcement)


> **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
- `Business\SAIF.Business.Menu\clsApplicationCode.vb`
