SQL Make Database Changes - SQL Based Methods (ESQL)

Name

Type

Description

SqlDataBaseCreate

Function

Function for creating a new SQL Database.

Note: This is for creating new SQL DATABASES - not database tables!

SqlTableCreate

Function

Creates an SQL Table at the SQL back-end.

SqlTableRemove

Function

Deletes the data cache file and .int file, then drops the passed data table name.

SqlTableRename

Function

To rename an existing table name

SqlViewRemove

Function

Deletes the data cache file and .int file, then drops the passed SQL data view.

SqlColumnAdd

Function

To add a new column to a table.

SqlColumnChange

Function

To change the length or type of an existing column.

SqlColumnRemove

Function

To remove an existing table column/field.

SqlColumnRename

Function

To rename an existing column/field.

SqlColumnDefaultValue

Function

To set a default value for a column.

SqlColumnNullable

Function

To set if a column accepts NULL values or not.

SQLTableConvertToEmbedded

Function

To convert an SQL table to Embedded (a DataFlex .dat file)

SqlColumnUpdateValue

Function

To populate all existing table rows for a column.


Several of the above functions have their counterpart as "ApiXXX" functions - see API Based Methods.

The difference is that the "SqlXXX" functions above doesn't use Structure_Start and Structure_End commands to make changes to the SQL server. Instead they use ESQL (Embedded SQL). This can drastically reduce the time it takes to perform some tasks as the Structure_Start/End usually exports all table data, drops the table and loads the table again with data. Something that can be very time consuming if there is a lot of data. These functions are available to SQL based tables only.


Note: If you don't find what you are looking for here, look at the API Make Database Changes sections for more functions.