Skip to content

Flow documentation · legacy product

ExecSQLStatementDest ​

Declaration ​

function ExecSQLStatementDest(const aSQL: string; aDBIndex : integer): boolean;

Example ​

pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := ExecSQLStatementDest('update dr_accs set name='cam' where accno=1',0);
end;

Description ​

Executes aSQL query against the database and returns True or False regarding the success of the query. This is commonly used with SQL statements that do not return a dataset eg Insert or Update

The SQL query is executed against a DB Connection on the Destination of the map. aDBIndex indicates which of the DB Connections is used based on its zero based index.

TIP

The SQL query will become part of the default SQL Transaction open against the destination database. This means any queries will be rolled back if the action fails. Should you wish to keep these query results regardless of the action status you should use