SQLColumnRename - cDbUpdateFunctionLibrary

Renames a SQL table column.


Type: Function


Parameters: Integer hTable, String sCurrentColumnName, String sNewColumnName

Parameter

Description

hTable

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

sCurrentColumnName

The current column name to be changed

sNewColumnName

The new name for the column.


Syntax


Procedure SQLColumnRename Handle hTable String sCurrentColumnName String sNewColumnName

Call:

Send SQLColumnRename MyTableName.File_Number "CurrentColumnName" "NewColumnName"



Description

Use it to change a column name.

Note: If you want to add a field/column with the DataFlex Embedded database, use the API based ColumnRename function instead.


Example


Procedure OnUpdate

    Boolean bOK

   

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


End_Procedure