SqlColumnUpdateValue - cDbUpdateFunctionLibrary

 To populate a table column with a value. This function is called automatically by the SqlColumnAdd message if the property pbCopyData is True. An ESQL statement is used to make the update at the SQL back-end.


Type: Function


Parameters: Handle hTable String sColumnName String sColumnValue

Parameter

Description

hTable

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

sColumnName

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 SqlColumnUpdateValue Handle hTable String sFieldName String sColumnValue

Call:

Get SqlColumnUpdateValue 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 SqlColumnUpdateValue Invoices.File_Number "PrintedFlag" "1" to bOK

    End_Procedure


End_Object