Routines for csv_db.kb


CheckFKContract

File Name

csv_db.kb

Syntax

CheckFKContract(VAL id: STRING): INTEGER

Parameters

id - contract number

Returns

Integer: success or failure

Side Effects

None

Description

This function inserts a contract record if the record does not already exist.

Dialog Forms Called

None


CheckFKVendor

File Name

csv_db.kb

Syntax

CheckFKVendor(VAL id: STRING): INTEGER

Parameters

id - vendor ID

Returns

Integer: success or failure

Side Effects

None

Description

This function inserts a vendor record if the record does not already exist.

Dialog Forms Called

None


DeleteFieldMapList

File Name

csv_db.kb

Syntax

DeleteFieldMapList(VAL migration_id: INTEGER): INTEGER

Parameters

migration_id - migration ID

Returns

Integer: success or failure

Side Effects

None

Description

This function deletes field mapping records using the migration ID.

Dialog Forms Called

None


DeleteMigRec

File Name

csv_db.kb

Syntax

DeleteMigRec( VAL InTran: BOOLEAN, REF DeleteRec: MigrationRec): INTEGER

Parameters

inTran - in a database transaction

DeleteRec - migration record

Returns

Integer: success or failure

Side Effects

None

Description

This function deletes a migration record from the migration table.

Dialog Forms Called

None


FetchMigrationRec

File Name

csv_db.kb

Syntax

FetchMigrationRec(REF mig: MigrationRec,VAL where: STRING): INTEGER

Parameters

mig - migration record

where - Where clause of select string

Returns

Integer: success or failure

Side Effects

None

Description

This function selects a migration record based on the Where clause.

Dialog Forms Called

None


GetFieldMapList

File Name

csv_db.kb

Syntax

GetFieldMapList( REF ktypeList: LIST OF Field_MapRec, VAL id: INTEGER): INTEGER

Parameters

ktypelist - list of field mapping records

id - migration ID

Returns

Integer: success or failure

Side Effects

None

Description

This function selects the field mapping records using the migration ID.

Dialog Forms Called

None


GetMigration

File Name

csv_db.kb

Syntax

GetMigration(REF ktype: MigrationRec,VAL ID: STRING): INTEGER

Parameters

ktype - migration record

id - migration ID

Returns

Integer: success or failure

Side Effects

None

Description

This function selects a migration record based on the migration ID.

Dialog Forms Called

None


GetMigrationList

File Name

csv_db.kb

Syntax

GetMigrationList( REF ktypeList: LIST OF MigrationRec): INTEGER

Parameters

ktypelist - list of migration records

Returns

Integer: success or failure

Side Effects

None

Description

This function selects the migration records from the migration table.

Dialog Forms Called

None


InsertMigRec

File Name

csv_db.kb

Syntax

InsertMigRec( VAL InTran: BOOLEAN, REF InsertRec: MigrationRec): INTEGER

Parameters

inTran - in a database transaction

InsertRec - migration record

Returns

Integer: success or failure

Side Effects

None

Description

This function inserts a migration record into the migration table.

Dialog Forms Called

None


MapInvContract

File Name

csv_db.kb

Syntax

MapInvContract(VAL inTran: BOOLEAN,REF inv: IS_InventoryRec, REF invKList: LIST OF ContractRec,VAL wHdl: WINDOW): INTEGER

Parameters

inTran - in database transaction

inv - inventory record

invKList - inventory contract records

whdl - dialog window handle

Returns

Integer: success or failure

Side Effects

None

Description

This function adds a record into the inv_contract table to map the contract record to the inventory record.

Dialog Forms Called

None


UpdateListOfFieldMapRec

File Name

csv_db.kb

Syntax

UpdateListOfFieldMapRec( VAL InTran: BOOLEAN,REF BeforeList: LIST OF Field_MapRec, REF AfterList: LIST OF Field_MapRec): INTEGER

Parameters

inTran - in a database transaction

Beforelist - old list of field mapping records

AfterList - new list of field mapping records

Returns

Integer: success or failure

Side Effects

None

Description

This function updates the field mapping records in the field_map table.

Dialog Forms Called

None


UpdateListOfMigRec

File Name

csv_db.kb

Syntax

UpdateListOfMigRec( VAL InTran: BOOLEAN,REF BeforeList: LIST OF MigrationRec, REF AfterList: LIST OF MigrationRec): INTEGER

Parameters

inTran - in a database transaction

Beforelist - old list of migration records

AfterList - new list of migration records

Returns

Integer: success or failure

Side Effects

None

Description

This function updates the migration records in the migration table.

Dialog Forms Called

None


UpdateMigRec

File Name

csv_db.kb

Syntax

UpdateMigRec( VAL InTran: BOOLEAN, REF BeforeRec: MigrationRec, REF AfterRec: MigrationRec): INTEGER

Parameters

inTran - in a database transaction

BeforeRec - old migration record

AfterRec - new migration record

Returns

Integer: success or failure

Side Effects

None

Description

This function updates a migration record in the migration table.

Dialog Forms Called

None