ApiColumnUpdateValue- cDbUpdateFunctionLibrary

 To populate a table column with a value. This function is called automatically by the ApiColumnAdd if the passed parameter bInitValue is True.


Type: Function


Parameters: Handle hTable String sFieldName String sColumnValue

Parameter

Description

hTable

A file handle to the table name. Same as the Filelist.cfg slot number.

sFieldName

The field/column name that is to be filled with the sColumnValue for each existing row.

sColumnValue

The column value to fill each existing row with.


Syntax


Function ApiColumnUpdateValue Handle hTable String sFieldName String sColumnValue

Call:

Get ApiColumnUpdateValue MyTable.File_Number "SomeField" "NewValue" to bOK



Description

Use it to update a field/column value to a value. It will be done for each existing row of the table.


Example


Object oDbUpdateVersion1 is a cDbUpdateVersion

    Set pnVersionNumber to 1.0


    Procedure OnUpdate

        Boolean bOK

        Get ApiColumnUpdateValue Invoices.File_Number "PrintedFlag" "1" to bOK

    End_Procedure


End_Object