Run non query

Runs a non query like UPDATE, INSERT, DELETE... on a database.

Run Non Query designer

Designer Properties#

  1. Query The database query to be run on the connected database.

Properties#

Run Non Query properties

Input#

  1. Connection The connection opened using OpenConnection activity. We can either set the connection or create another using Provider Name and Connection String.
  2. Connection string Database connection string. As an example, for the example below the format is "Driver={PostgreSQL ODBC Driver(UNICODE)};Server=127.0.0.1;Port=5432;Database=postgres;UID=postgres;PWD=yourpassword"
  3. Provider Name The provider used to connect to the database. For instance, in the example below we use Odbc to connect to a postgres database.
  4. See Designer Properties above.

Database advanced#

  1. Command Type Sets how the command string is interpreted.
    1. Text Runs a query with the given parameters.
    2. StoreProcedure Calls the store procedure with the given sql parameters.
    3. TableDirect Returns all the content of a database table.
  2. Parameters A dictionary with all query parameters to be used by the sql query. The parameters must be specified as @parameter in the sql query and will be replaced at runtime with the value of the corresponding parameter from dictionary. To add/remove parameters just the ... button in properties window.
  3. Timeout in ms The maximum time to wait for the query to complete.

General Properties#

See General Properties.

Misc#

See Misc.

Out Error#

See Out Error.

Output Properties#

  1. Affected Rows The number of rows affected by the command. It returns a value only for insert, update and delete. For all other commands is -1.

Example#

Please check Open database connection example.