source action which executes a prepared SQL statement. In order to use this action a -Prepare action must have been created in a surrounding inline.
The value for -Exec should be an array with the same number of values as there are placeholders in the prepared SQL statement.
For example, an INSERT can be written as a prepared statement as follows. The values to be inserted are left as placeholders. When this statement is executed by the following action the placeholders are filled with their respective values.
-Prepare='INSERT INTO Contacts.People (First,Last) VALUES (?, ?)'
-Exec=(Array: 'John', 'Doe')
Prepared statements are most useful when they are prepared once and then executed many times. By preparing the statement the data source can optimize its access and perform many INSERT or UPDATE operations more quickly than they could be performed otherwise.
[Inline: -Database='Contacts', -Prepare='INSERT INTO People (First,Last) VALUES (?, ?)']
[Inline: -Exec=(Array: 'John', 'Doe')][/Inline]
[Inline: -Exec=(Array: 'Jane', 'Person')][/Inline]
[Inline: -Exec=(Array: 'Ray', 'Surname')][/Inline]
[/Inline]
See the Lasso 8 Language Guide for examples of how to use this tag.
Tag Link | -Exec | Category | Action |
---|---|---|---|
Type | Command | Data Source | MySQL |
Support | Preferred | Version | 8.5 |
Output Type | None | Security | None |
Implementation | Internal | Sets | Lasso 8.5 |
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft