Execute Database Statement
- 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
Execute Database Statement
- Updated on 14 May 2021
- 1 Minute to read
-
Print
-
DarkLight
-
PDF
This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.
Execute Database Statement
Executes a statement against a database.
Script usage:
Execute-DatabaseStatement( Connection: <text>, Statement: <text>, [LogStatement: <true/false>] );
This operation may be prefixed with Core::
, although this is a built-in namespace and isn't really necessary.
Arguments:
Name | Format | Script Usage | Usage Notes |
---|---|---|---|
☆ Database connection | text | Connection | This argument is required. |
☆ SQL Statement | text | Statement | This argument is required. |
Log statement to execute | true/false | LogStatement |
Example:
Execute-DatabaseStatement ( Statement: >> print 'Executing BuildMaster statement...' select * from sys.databases where owner_sid > 1 order by name print 'Execution complete.' >>, Connection: SqlServerTesting );
Was this article helpful?