ApiColumnRename - cDbUpdateFunctionLibrary

Renames a table column.


Type: Function


Parameters: Handle hTable, String sCurrentColumnName, String sNewColumnName

Parameter

Description

hTable

The name of the SQL table to add a column to. Note: If instead need to pass the table name as a string you can use the SQLColumnRemoveByTableName function.

sCurrentColumnName

The present column name to be changed

sNewColumnName

The new name for the column.


Syntax


Procedure ApiColumnRename Handle hTable String sCurrentColumnName String sNewColumnName

Call:

Send ApiColumnRename YourTableName.File_Number "CurrentColumnName" "NewColumnName"



Description

Use it to change a column name.

Note: If you want to add a field/column for an SQL table, use the SqlColumnRename function instead.


Example


Procedure OnUpdate

   Boolean bOK

   

   Get ApiColumnRename Order.File_Number "CurrentColumnName" "NewColumnName" to bOK    


End_Procedure