Skip to content

SQL-MENU-002: Insert application code

Insert an application code row.

Classification

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

Parameters

Parameter Direction Type Max length Description
:Code Input String 5 Lookup key. SQL-declared and code-bound.
:CodeDescr Input String 100 Code description. SQL-declared, but BeforeInsert in clsApplicationCode.vb never calls DataRequest.AddParm with the CodeDescr value, so this bind is never supplied at execution time.
:ApplicationPath Input String 65 Application path/description. SQL-declared and code-bound.
:ActiveFlag Input String 1 Y/N active flag. SQL-declared and code-bound.

Tables

Table Access Columns used
BUSONLINE_APPS_CODE INSERT CODE, CODE_DESCR, ACTIVE_CODE

Sample SQL

INSERT INTO BUSONLINE_APPS_CODE (
  CODE,
  CODE_DESCR,
  ACTIVE_CODE)
VALUES (
  :Code,
  :CodeDescr, :ApplicationPath, :ActiveFlag)

Source-defect note

The InsertSQL string in clsApplicationCode.vb declares three target columns (CODE, CODE_DESCR, ACTIVE_CODE) but supplies four bind tokens in the VALUES clause (:Code, :CodeDescr, :ApplicationPath, :ActiveFlag) — one more bind than there are columns to receive them. BeforeInsert only calls AddParm for Code, ApplicationPath, and ActiveFlag; it never adds a parameter named CodeDescr. This target-column/value-count mismatch, combined with the unbound :CodeDescr token, is a source-level defect in clsApplicationCode.vb, not a documentation gap. The exact runtime outcome (for example, whether execution fails with a missing-bind-variable error or the Oracle provider resolves the extra bind token some other way) is not established by the source and is unknown until this statement is executed and verified against the live database.** Callers of clsApplicationCode.Save() for a new row should verify actual runtime behavior before relying on this statement.

Operations and processes

Business rules

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

Sources

  • SAIF.Business.Menu\clsApplicationCode.vb