Hide last authors
gru 5.5 1 {{figure image="sql_en.png" width="300" clear="h1"/}}
gru 1.1 2
gru 5.5 3 Actions of type //Database query// allow you to write custom SQL queries and execute them against a database. The database connection must have been setup in the [[database connection menu>>Formcycle.UserInterface.Data.DBConnections]]. The SQL statement may contain [[variables>>Formcycle.UserInterface.Variables]].
gru 1.1 4
gru 5.5 5 == Options
gru 1.1 6
gru 5.1 7 ; Statement
gru 5.5 8 : The SQL statement to be executed.
gru 1.1 9
gru 5.5 10 == Note ==
gru 1.1 11
12
gru 5.5 13 The statement will be executed as a so called //prepared statement//, which prevents SQL injection attacks. You do not need to use simple quotation marks ({{code language="none"}}'{{/code}}).
gru 1.1 14
gru 5.5 15 (% style="color: rgb(56, 118, 29);" %)**Correct**
16
gru 1.1 17 {{code language="sql"}}
gru 5.5 18 insert into test_tabelle (firstName, lastName) values ([%tfFirstName%], [%tfLastName%])
gru 1.1 19 {{/code}}
20
gru 5.5 21 (% style="color: rgb(204, 0, 0);" %)**Wrong**
gru 1.1 22
23 {{code language="sql"}}
gru 5.5 24 insert into test_tabelle (firstName, lastName) values ('[%tfFirstName%]', '[%tfLastName%]')
gru 1.1 25 {{/code}}
Copyright 2000-2024