insert Method

This method has been deprecated and should not be used in Profile versions v6.4 and above. There are more effective ways of performing the function previously fulfilled by the Db.insert method. At a future date, this method may be removed from the PSL compiler. Therefore, FIS recommends that instead of using the Db.insert method, you instantiate an object as Class.new and use the save or bypassSave method.

Class: Db

Description

This method inserts a new record into the database. This method is equivalent to the SQL INSERT statement. To update an existing record in the database, use the Db.update method.

Example SQL INSERT statement:

INSERT INTO UTBLBRCD(BRCD,DESC) VALUES (:BR,:NAME)

As of Profile version 6.3, this method supports lowercase variables, object.property, and system variables within the host variable syntax. PSL maps these variables and object references into uppercase host variables.

image\msgs.gif

To ensure high performance batch processing and transaction processing requirements where data integrity is controlled in the program procedural logic, use the RecordClass.bypassSave method.

Syntax

Db.insert(tableName,columnList,valueList,qualifiers)

Parameters

tableName

A valid database table name.

columnList

A comma-separated list of table column names into which to insert data.

valueList

A comma-separated list of values to insert into the specified columns.

qualifiers

A list of qualifiers to process when executing the method. Qualifiers are separated by slashes (/). The following qualifiers are already pre-programmed into the Db.insert method. You can, however, include additional qualifiers in the method.

  • NOVKCHK=1

  • NOVALDD

  • NOVALREQ

  • NOVALRI

Returns

Void

When Became Available

v6.0

Example 1

do Db.insert("UTBLBRCD","BRCD,DESC",":BRANCH,:NAME1")

do Db.insert("UTBLCC","CCODE,DESC","123,’New Cost Center’")

Example 2 – Use of Qualifiers

do Db.insert("DEP","CID",":CID","/VALDD/NOTRIGAFT")