SQL functions

RedshiftCreateConnection

Declaration

RedshiftConnection RedshiftCreateConnection(string connectionString)

Description

Creates a connection to an Amazon Redshift database. This function is deprecated. Use RedshiftCreateNamedConnection() instead.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
connectionString A connection string specifying the connection to be created.

Return Value

A connection to the database specified in the connection string.

RedshiftCreateNamedConnection

Declaration

RedshiftConnection RedshiftCreateNamedConnection(string dataSourceName)

Description

Creates a named connection to an Amazon Redshift database.

Supported Runtime Versions

4.0, 5.0

Parameters Description
dataSourceName A data source name specifying the connection to be created.

Return Value

A connection to the database specified in the connection string.

RedshiftDisconnect

Declaration

void RedshiftDisconnect(RedshiftConnection connection)

Description

Disconnects a Redshift database connection.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be disconnected.

Return Value

Does not return a value.

RedshiftExecuteNonQuery

Declaration

int RedshiftExecuteNonQuery(RedshiftConnection connection, string statement, int commandTimeout, string commandType)

Description

Executes a non-query SQL statement on a Redshift connection.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.
commandType Can be StoredProcedure, TableDirect, or Text.

Return Value

The number of affected rows.

RedshiftExecuteNonQuery

Declaration

int RedshiftExecuteNonQuery(RedshiftConnection connection, string statement)

Description

Executes a non-query SQL statement on a Redshift connection.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.

Return Value

The number of affected rows.

RedshiftExecuteQuery

Declaration

SQLData RedshiftExecuteQuery(RedshiftConnection connection, string statement, int commandTimeout)

Description

Executes a query on a Redshift database.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The result of the database query.

RedshiftExecuteQuery

Declaration

SQLData RedshiftExecuteQuery(RedshiftConnection connection, string statement)

Description

Executes a query on a Redshift database.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.

Return Value

The result of the database query.

SQLAlterIndex

Declaration

void SQLAlterIndex(SQLConnection connection, string tableName, string indexName, SQLAlterIndexOp alterOp)

Description

Alters the index by either reorganizing or rebuilding. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.
alterOp The operation to alter the index. This parameter is ignored for PostgreSQL.

Return Value

void

SQLBindBooleanInputOutputParameter

Declaration

void SQLBindBooleanInputOutputParameter(SQLPreparedCommand command, string name, bool value)

Description

Binds a Boolean input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindBooleanInputOutputParameter

Declaration

void SQLBindBooleanInputOutputParameter(SQLPreparedCommand command, string name, bool value, int size)

Description

Binds a Boolean input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindBooleanOutputParameter

Declaration

void SQLBindBooleanOutputParameter(SQLPreparedCommand command, string name)

Description

Binds a Boolean output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.

Return Value

Does not return a value.

SQLBindBooleanOutputParameter

Declaration

void SQLBindBooleanOutputParameter(SQLPreparedCommand command, string name, int size)

Description

Binds a boolean output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindBooleanParameter

Declaration

void SQLBindBooleanParameter(SQLPreparedCommand command, string name, bool value)

Description

Binds a Boolean parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindBooleanParameter

Declaration

void SQLBindBooleanParameter(SQLPreparedCommand command, string name, bool value, int size)

Description

Binds a Boolean parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindBooleanReturnValue

Declaration

void SQLBindBooleanReturnValue(SQLPreparedCommand command, string name)

Description

Binds a boolean return value to the prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind return value to.
name Name of the return value.

Return Value

Does not return a value.

SQLBindDateTimeInputOutputParameter

Declaration

void SQLBindDateTimeInputOutputParameter(SQLPreparedCommand command, string name, DateTime value)

Description

Binds a DateTime input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindDateTimeInputOutputParameter

Declaration

void SQLBindDateTimeInputOutputParameter(SQLPreparedCommand command, string name, DateTime value, int size)

Description

Binds a DateTime input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDateTimeOutputParameter

Declaration

void SQLBindDateTimeOutputParameter(SQLPreparedCommand command, string name)

Description

Binds a DateTime output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.

Return Value

Does not return a value.

SQLBindDateTimeOutputParameter

Declaration

void SQLBindDateTimeOutputParameter(SQLPreparedCommand command, string name, int size)

Description

Binds a DateTime output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDateTimeParameter

Declaration

void SQLBindDateTimeParameter(SQLPreparedCommand command, string name, DateTime value)

Description

Binds a DateTime parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindDateTimeParameter

Declaration

void SQLBindDateTimeParameter(SQLPreparedCommand command, string name, DateTime value, int size)

Description

Binds a DateTime parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDateTimeReturnValue

Declaration

void SQLBindDateTimeReturnValue(SQLPreparedCommand command, string name)

Description

Binds a DateTime return value to the prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind return value to.
name Name of the return value.

Return Value

Does not return a value.

SQLBindDoubleInputOutputParameter

Declaration

void SQLBindDoubleInputOutputParameter(SQLPreparedCommand command, string name, double value)

Description

Binds a double input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindDoubleInputOutputParameter

Declaration

void SQLBindDoubleInputOutputParameter(SQLPreparedCommand command, string name, double value, int size)

Description

Binds a double input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDoubleOutputParameter

Declaration

void SQLBindDoubleOutputParameter(SQLPreparedCommand command, string name)

Description

Binds a double output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.

Return Value

Does not return a value.

SQLBindDoubleOutputParameter

Declaration

void SQLBindDoubleOutputParameter(SQLPreparedCommand command, string name, int size)

Description

Binds a double output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDoubleParameter

Declaration

void SQLBindDoubleParameter(SQLPreparedCommand command, string name, double value)

Description

Binds a double parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindDoubleParameter

Declaration

void SQLBindDoubleParameter(SQLPreparedCommand command, string name, double value, int size)

Description

Binds a double parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindDoubleReturnValue

Declaration

void SQLBindDoubleReturnValue(SQLPreparedCommand command, string name)

Description

Binds a double return value to the prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind return value to.
name Name of the return value.

Return Value

Does not return a value.

SQLBindIntegerInputOutputParameter

Declaration

void SQLBindIntegerInputOutputParameter(SQLPreparedCommand command, string name, int value)

Description

Binds an integer input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindIntegerInputOutputParameter

Declaration

void SQLBindIntegerInputOutputParameter(SQLPreparedCommand command, string name, int value, int size)

Description

Binds an integer input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindIntegerOutputParameter

Declaration

void SQLBindIntegerOutputParameter(SQLPreparedCommand command, string name)

Description

Binds an integer output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.

Return Value

Does not return a value.

SQLBindIntegerOutputParameter

Declaration

void SQLBindIntegerOutputParameter(SQLPreparedCommand command, string name, int size)

Description

Binds an integer output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindIntegerParameter

Declaration

void SQLBindIntegerParameter(SQLPreparedCommand command, string name, int value)

Description

Binds an integer parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindIntegerParameter

Declaration

void SQLBindIntegerParameter(SQLPreparedCommand command, string name, int value, int size)

Description

Binds an integer parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindIntegerReturnValue

Declaration

void SQLBindIntegerReturnValue(SQLPreparedCommand command, string name)

Description

Binds an integer return value to the prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind return value to.
name Name of the return value.

Return Value

Does not return a value.

SQLBindStringInputOutputParameter

Declaration

void SQLBindStringInputOutputParameter(SQLPreparedCommand command, string name, string value)

Description

Binds a string input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindStringInputOutputParameter

Declaration

void SQLBindStringInputOutputParameter(SQLPreparedCommand command, string name, string value, int size)

Description

Binds a string input/output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindStringOutputParameter

Declaration

void SQLBindStringOutputParameter(SQLPreparedCommand command, string name)

Description

Binds a string output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.

Return Value

Does not return a value.

SQLBindStringOutputParameter

Declaration

void SQLBindStringOutputParameter(SQLPreparedCommand command, string name, int size)

Description

Binds a string output parameter to a prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindStringParameter

Declaration

void SQLBindStringParameter(SQLPreparedCommand command, string name, string value)

Description

Binds a string parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.

Return Value

Does not return a value.

SQLBindStringParameter

Declaration

void SQLBindStringParameter(SQLPreparedCommand command, string name, string value, int size)

Description

Binds a string parameter to a prepared command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command Prepared command to bind parameter to.
name Name of the parameter to be bound.
value The parameter's value.
size The parameter's size. The size of the parameter is used only for the variable-length output parameters and variable-length input/output parameters, such as strings (nvarchar). The size is ignored for all input parameters and fixed-size parameters.

Return Value

Does not return a value.

SQLBindStringReturnValue

Declaration

void SQLBindStringReturnValue(SQLPreparedCommand command, string name)

Description

Binds a string return value to the prepared command.

Supported Runtime Versions

5.0

Parameters Description
command Prepared command to bind return value to.
name Name of the return value.

Return Value

Does not return a value.

SQLBulkInsertData

Declaration

void SQLBulkInsertData(SQLConnection connection, string name, SQLData table)

Description

Writes bulk data to a server.

Supported Runtime Versions

5.0

Parameters Description
connection Relational connection.
name Name of the table to write to.
table Bulk data to be written.

Return Value

void

SQLBulkInsertData

Declaration

void SQLBulkInsertData(SQLConnection connection, string name, SQLData table, int timeout)

Description

Writes bulk data to a server.

Supported Runtime Versions

5.0

Parameters Description
connection Relational connection.
name Name of the table to write to.
table Bulk data to be written.
timeout Time-out for the write operation.

Return Value

void

SQLCreateConnection

Declaration

SQLConnection SQLCreateConnection(string connectionString)

Description

Creates a connection to a relational database. This function is deprecated. Use SQLCreateNamedConnection() instead.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
connectionString Connection string specifying the connection to be created.

Return Value

A connection to the database specified in the connection string.

SQLCreateConnection

Declaration

SQLConnection SQLCreateConnection(string connectionString, bool oracleConnection)

Description

Creates a connection to a relational database. This function is deprecated. Use SQLCreateNamedConnection() instead.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
connectionString Connection string specifying the connection to be created.
oracleConnection If true, a connection to a Oracle database will be used. If false, a SQL Server connection will be used.

Return Value

A connection to the database specified in the connection string.

SQLCreateIndex

Declaration

void SQLCreateIndex(SQLConnection connection, string tableName, string indexName, SQLIndexType type, StringList keyColumnNames)

Description

Creates an index on a relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.
type Type of index to create.
keyColumnNames List of the names of the key columns.

Return Value

void.

SQLCreateIndex

Declaration

void SQLCreateIndex(SQLConnection connection, string tableName, string indexName, SQLIndexType type, StringList keyColumnNames, VariantList keyColumnSorting)

Description

Creates an index on a relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.
type Type of index to create.
keyColumnNames List of the names of the key columns.
keyColumnSorting List of key column sorting types. If the list is empty, the default database setting is applied.

Return Value

void.

SQLCreateIndex

Declaration

void SQLCreateIndex(SQLConnection connection, string tableName, string indexName, SQLIndexType type, StringList keyColumnNames, VariantList keyColumnSorting, bool dropIfExists, StringList includedColumnNames)

Description

Creates an index on a relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.
type Type of index to create.
keyColumnNames List of the names of the key columns.
keyColumnSorting List of key column sorting types. If the list is empty, the default database setting is applied.
dropIfExists Flag to drop the index if it already exists. This parameter is ignored for PostgreSQL.
includedColumnNames List of names of included columns. This parameter is not supported on PostgreSQL.

Return Value

void.

SQLCreateInMemoryTable

Declaration

SQLData SQLCreateInMemoryTable()

Description

Creates an in-memory data table.

Supported Runtime Versions

5.0

Parameters

The function has no parameters.

Return Value

An instance of an in-memory table.

SQLCreateNamedConnection

Declaration

SQLConnection SQLCreateNamedConnection(string dataSourceName)

Description

Creates a named connection to a relational database.

Supported Runtime Versions

5.0

Parameters Description
dataSourceName Name of the data source describing the connection to be created.

Return Value

A connection to the database specified by the data source name.

SQLCreateNamedOracleConnection

Declaration

SQLConnection SQLCreateNamedOracleConnection(string dataSourceName)

Description

Creates a named connection to an Oracle database.

Supported Runtime Versions

4.0, 5.0

Parameters Description
dataSourceName Name of the data source describing the connection to be created.

Return Value

A connection to the database specified by the data source name.

SQLCreateNamedPostgreSQLConnection

Declaration

SQLConnection SQLCreateNamedPostgreSQLConnection(string dataSourceName)

Description

Creates a named connection to a PostgreSQL database.

Supported Runtime Versions

4.0, 5.0

Parameters Description
dataSourceName Name of the data source describing the connection to be created.

Return Value

A connection to the database specified by the data source name.

SQLCreateNamedSqlServerConnection

Declaration

SQLConnection SQLCreateNamedSqlServerConnection(string dataSourceName)

Description

Creates a named connection to a SQL Server database.

Supported Runtime Versions

4.0, 5.0

Parameters Description
dataSourceName Name of the data source describing the connection to be created.

Return Value

A connection to the database specified by the data source name.

SQLCreatePostgreSQLConnection

Declaration

SQLConnection SQLCreatePostgreSQLConnection(string connectionString)

Description

Creates a connection to a PostgreSQL database. This function is deprecated. Use SQLCreateNamedConnection() instead.

Supported Runtime Versions

4.0, 5.0

This function is not supported in a cloud environment.

Parameters Description
connectionString Connection string specifying the connection to be created.

Return Value

A connection to the database specified in the connection string.

SQLCreatePreparedCommand

Declaration

SQLPreparedCommand SQLCreatePreparedCommand(SQLConnection connection, string statement)

Description

Creates a prepared SQL command.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
connection Database connection to be used for creating the command.
statement Statement to be executed by the command.

Return Value

A prepared SQL command.

SQLDataAddColumn

Declaration

void SQLDataAddColumn(SQLData table, string column, SqlDataType columnType)

Description

Add a new column to the data table.

Supported Runtime Versions

5.0

Parameters Description
table The data table to be modified.
column The name of a column to be added.
columnType The type of a column to be added.

Return Value

Does not return a value.

SQLDataAddColumn

Declaration

void SQLDataAddColumn(SQLData table, string column, SqlDataType columnType, bool nullable)

Description

Add a new column to the data table.

Supported Runtime Versions

5.0

Parameters Description
table The data table to be modified.
column The name of a column to be added.
columnType The type of a column to be added.
nullable Nullability of the column.

Return Value

Does not return a value.

SQLDataDeleteAllRows

Declaration

void SQLDataDeleteAllRows(SQLData table)

Description

Deletes all data from a data table.

Supported Runtime Versions

5.0

Parameters Description
table The data table to be modified.

Return Value

Does not return a value.

SQLDataDeleteRow

Declaration

void SQLDataDeleteRow(SQLData table, int index)

Description

Deletes data with a given index from a data table.

Supported Runtime Versions

5.0

Parameters Description
table The data table to be modified.
index Row index.

Return Value

Does not return a value.

SQLDataGetColumns

Declaration

StringDictionary SQLDataGetColumns(SQLData data)

Description

Returns the list of columns and the data types of the columns.

Supported Runtime Versions

5.0

Parameters Description
data SQLData result of a query.

Return Value

Returns dictionary of column name and its type.

SQLDataInsertRow

Declaration

void SQLDataInsertRow(SQLData table, VariantList row)

Description

Inserts new row to the table.

Supported Runtime Versions

5.0

Parameters Description
table Table to be inserted into.
row Row data to be inserted.

Return Value

Does not return a value.

SQLDataInsertRow

Declaration

void SQLDataInsertRow(SQLData table, SQLDataRow row)

Description

Inserts new row to the table.

Supported Runtime Versions

5.0

Parameters Description
table Table to be inserted into.
row Row data to be inserted.

Return Value

Does not return a value.

SQLDataReadTableDefinition

Declaration

SQLData SQLDataReadTableDefinition(SQLConnection connection, string physicalTableName)

Description

Creates an in-memory data table with the same schema as the physical table in the SQL Server, but the data is not read from the physical table.

Supported Runtime Versions

5.0

Parameters Description
connection Relational connection.
physicalTableName The name of the physical table to be used for creating the in-memory table.

Return Value

An instance of an in-memory table.

SQLDataRemoveColumn

Declaration

void SQLDataRemoveColumn(SQLData table, string column)

Description

Removes a column of a data table.

Supported Runtime Versions

5.0

Parameters Description
table The data table to be modified.
column The name of a column to be added.

Return Value

Does not return a value.

SQLDataRowGetBoolean

Declaration

bool SQLDataRowGetBoolean(SQLDataRow row, string column)

Description

Returns a certain column value in a result row as a bool.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDataRowGetData

Declaration

variant SQLDataRowGetData(SQLDataRow row, string column)

Description

Returns a certain column value in a result row.

Supported Runtime Versions

5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDataRowGetDateTime

Declaration

DateTime SQLDataRowGetDateTime(SQLDataRow row, string column)

Description

Returns a certain column value in a result row as a DateTime.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDataRowGetDouble

Declaration

double SQLDataRowGetDouble(SQLDataRow row, string column)

Description

Returns a certain column value in a result row as a double.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDataRowGetInteger

Declaration

int SQLDataRowGetInteger(SQLDataRow row, string column)

Description

Returns a certain column value in a result row as an integer.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDataRowGetString

Declaration

string SQLDataRowGetString(SQLDataRow row, string column)

Description

Returns a certain column value in a result row as a string.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
row Result row to return value from.
column Name of the column of which to return value.

Return Value

The value of the specified column.

SQLDisconnect

Declaration

void SQLDisconnect(SQLConnection connection)

Description

Disconnects a database connection.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be disconnected.

Return Value

Does not return a value.

SQLDropIndex

Declaration

void SQLDropIndex(SQLConnection connection, string tableName, string indexName, bool ifExists)

Description

Drops index on a relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.
ifExists If set to true, an error will not be thrown if the index does not exist on the table.

Return Value

void

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLConnection connection, string statement, int commandTimeout, string commandType)

Description

Executes a non-query SQL statement. Should be used for static queries only.

Supported Runtime Versions

4.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.
commandType Can be StoredProcedure, TableDirect, or Text.

Return Value

The number of affected rows.

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLPreparedCommand command, int commandTimeout)

Description

Executes a prepared command, representing a non-query statement.

Supported Runtime Versions

4.0, 5.0

Parameters Description
command The prepared command to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The number of rows affected by the command.

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLConnection connection, string statement, int commandTimeout)

Description

Executes a non-query SQL statement. Should be used for static queries only.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The number of affected rows.

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLConnection connection, string statement, int commandTimeout, SQLPreparedCommandType commandType)

Description

Executes a non-query SQL statement. Should be used for static queries only.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.
commandType Can be StoredProcedure, TableDirect, or Text.

Return Value

The number of affected rows.

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLPreparedCommand command)

Description

Executes a prepared command, representing a non-query statement.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command The prepared command to be executed.

Return Value

The number of rows affected by the command.

SQLExecuteNonQuery

Declaration

int SQLExecuteNonQuery(SQLConnection connection, string statement)

Description

Executes a non-query SQL statement. Should be used for static queries only.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.

Return Value

The number of affected rows.

SQLExecuteQuery

Declaration

SQLData SQLExecuteQuery(SQLPreparedCommand command, int commandTimeout)

Description

Executes a prepared command, representing a query statement.

Supported Runtime Versions

4.0, 5.0

Parameters Description
command The prepared command to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The result of the database query.

SQLExecuteQuery

Declaration

SQLData SQLExecuteQuery(SQLConnection connection, string statement, int commandTimeout)

Description

Executes a SQL query statement. Should be used for static queries only.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The result of the database query.

SQLExecuteQuery

Declaration

SQLData SQLExecuteQuery(SQLPreparedCommand command)

Description

Executes a prepared command, representing a query statement.

Supported Runtime Versions

3.0, 4.0, 5.0

Parameters Description
command The prepared command to be executed.

Return Value

The result of the database query.

SQLExecuteQuery

Declaration

SQLData SQLExecuteQuery(SQLConnection connection, string statement)

Description

Executes a SQL query statement. Should be used for static queries only.

Supported Runtime Versions

1.0, 2.0, 3.0, 4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.

Return Value

The result of the database query.

SQLExecuteStoredProcedure

Declaration

int SQLExecuteStoredProcedure(SQLConnection connection, string procedureName, int commandTimeout)

Description

Executes a stored procedure.

Supported Runtime Versions

4.0, 5.0

Parameters Description
connection Database connection to be used for executing the query.
procedureName Name of the stored procedure to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

The number of affected rows.

SQLGetBooleanParameterValue

Declaration

bool SQLGetBooleanParameterValue(SQLPreparedCommand command, string name)

Description

Returns the value of a boolean parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to return the value for.
name Name of the parameter to return the value for.

Return Value

The value of the specified parameter.

SQLGetColumns

Declaration

StringDictionary SQLGetColumns(SQLConnection connection, SQLData data)

Description

Returns the list of columns and the data types of the columns. This function is obsolete. Please use the SQLDataGetColumns() function instead.

Supported Runtime Versions

5.0

Parameters Description
connection Relational connection.
data SQLData result of a query.

Return Value

Returns dictionary of column name and its type.

SQLGetDateTimeParameterValue

Declaration

DateTime SQLGetDateTimeParameterValue(SQLPreparedCommand command, string name)

Description

Returns the value of a DateTime parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to return the value for.
name Name of the parameter to return the value for.

Return Value

The value of the specified parameter.

SQLGetDoubleParameterValue

Declaration

double SQLGetDoubleParameterValue(SQLPreparedCommand command, string name)

Description

Returns the value of a double parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to return the value for.
name Name of the parameter to return the value for.

Return Value

The value of the specified parameter.

SQLGetIndexNames

Declaration

StringList SQLGetIndexNames(SQLConnection connection, string tableName)

Description

Gets a list of names of indexes on a relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.

Return Value

List of names of indexes.

SQLGetIndexType

Declaration

SQLIndexType SQLGetIndexType(SQLConnection connection, string tableName, string indexName)

Description

Gets the index type. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.

Return Value

Type of the index.

SQLGetIntegerParameterValue

Declaration

int SQLGetIntegerParameterValue(SQLPreparedCommand command, string name)

Description

Returns the value of an integer parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to return the value for.
name Name of the parameter to return the value for.

Return Value

The value of the specified parameter.

SQLGetStringParameterValue

Declaration

string SQLGetStringParameterValue(SQLPreparedCommand command, string name)

Description

Returns the value of a string parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to return the value for.
name Name of the parameter to return the value for.

Return Value

The value of the specified parameter.

SQLIndexExists

Declaration

bool SQLIndexExists(SQLConnection connection, string tableName, string indexName)

Description

Checks if an index exists on the relational table. The user must have permissions ViewRelationalObjects and EditRelationalObjects to execute this function.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
tableName Name of the table.
indexName Name of the index.

Return Value

True if an index of the name exists on the relational table, otherwise false.

SQLIsNull

Declaration

bool SQLIsNull(SQLDataRow row, string column)

Description

Checks whether a certain database column is NULL.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
row Row containing the column to be checked.
column Name of the column to be checked.

Return Value

True, if column is NULL, false otherwise.

SQLPrepareStoredProcedure

Declaration

SQLPreparedCommand SQLPrepareStoredProcedure(SQLConnection connection, string name)

Description

Creates a prepared stored procedure command.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for creating the command.
name Name of the stored procedure to be invoked.

Return Value

A prepared SQL command.

SQLQuoteString

Declaration

string SQLQuoteString(string text)

Description

Quotes a string, so it can be safely used in SQL statements.

Supported Runtime Versions

5.0

Parameters Description
text Text to be quoted.

Return Value

The quoted string.

SQLQuoteString

Declaration

string SQLQuoteString(SQLConnection connection, string text)

Description

Quotes a string, so it can be safely used in SQL statements.

Supported Runtime Versions

2.0, 3.0, 4.0, 5.0

Parameters Description
connection The current database connection.
text Text to be quoted.

Return Value

The quoted string.

SQLReadData

Declaration

SQLReader SQLReadData(SQLConnection connection, string statement)

Description

Executes a SQL query statement.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.

Return Value

Instance of SQLReader to read the result in batches.

SQLReadData

Declaration

SQLReader SQLReadData(SQLConnection connection, string statement, int commandTimeout)

Description

Executes a SQL query statement.

Supported Runtime Versions

5.0

Parameters Description
connection Database connection to be used for executing the query.
statement Statement to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

Instance of SQLReader to read the result in batches.

SQLReadData

Declaration

SQLReader SQLReadData(SQLPreparedCommand command)

Description

Executes a SQL prepared command.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to be executed.

Return Value

Instance of SQLReader to read the result in batches.

SQLReadData

Declaration

SQLReader SQLReadData(SQLPreparedCommand command, int commandTimeout)

Description

Executes a SQL prepared command.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to be executed.
commandTimeout Timeout (in seconds). Set to 0 to wait indefinitely.

Return Value

Instance of SQLReader to read the result in batches.

SQLReaderGetColumns

Declaration

StringDictionary SQLReaderGetColumns(SQLReader reader)

Description

Returns the list of columns and the data types of the columns.

Supported Runtime Versions

5.0

Parameters Description
reader SQLReader result of a query.

Return Value

Returns dictionary of column name and its type.

SQLReaderRelease

Declaration

void SQLReaderRelease(SQLReader reader)

Description

Releases an instance of SQLReader.

Supported Runtime Versions

5.0

Parameters Description
reader Instance of SQLReader to be released.

Return Value

Does not return a value.

SQLReleaseCommand

Declaration

void SQLReleaseCommand(SQLPreparedCommand command)

Description

Releases an instance of SQLPreparedCommand.

Supported Runtime Versions

5.0

Parameters Description
command Instance of SQLPreparedCommand to be released.

Return Value

Does not return a value.

SQLSetBooleanParameterValue

Declaration

void SQLSetBooleanParameterValue(SQLPreparedCommand command, string name, bool value)

Description

Sets the value of a boolean parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to set the value for.
name Name of the parameter to be set.
value The value to be set.

Return Value

Does not return a value.

SQLSetDateTimeParameterValue

Declaration

void SQLSetDateTimeParameterValue(SQLPreparedCommand command, string name, DateTime value)

Description

Sets the value of a DateTime parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to set the value for.
name Name of the parameter to be set.
value The value to be set.

Return Value

Does not return a value.

SQLSetDoubleParameterValue

Declaration

void SQLSetDoubleParameterValue(SQLPreparedCommand command, string name, double value)

Description

Sets the value of a double parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to set the value for.
name Name of the parameter to be set.
value The value to be set.

Return Value

Does not return a value.

SQLSetIntegerParameterValue

Declaration

void SQLSetIntegerParameterValue(SQLPreparedCommand command, string name, int value)

Description

Sets the value of an integer parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to set the value for.
name Name of the parameter to be set.
value The value to be set.

Return Value

Does not return a value.

SQLSetStringParameterValue

Declaration

void SQLSetStringParameterValue(SQLPreparedCommand command, string name, string value)

Description

Sets the value of a string parameter.

Supported Runtime Versions

5.0

Parameters Description
command The prepared command to set the value for.
name Name of the parameter to be set.
value The value to be set.

Return Value

Does not return a value.