Difference between revisions of "XL3RunSQLProc"
(Created page with "Allows a SQL Stored Procedure to be run when required (used in conjunction with XL3Link to trigger the execution) ==Syntax== {{Code|XL3RunSQLProc( ExcecuteSQL, ConnectionSt...") |
(Updated the Connection parameter to know about Connection IDs) |
||
Line 3: | Line 3: | ||
==Syntax== | ==Syntax== | ||
− | {{Code|XL3RunSQLProc( ExcecuteSQL, | + | {{Code|XL3RunSQLProc( ExcecuteSQL, Connection, ProcName, [Parameter1],..., [Parameter27])}} |
==Parameters== | ==Parameters== | ||
Line 13: | Line 13: | ||
| A cell reference that contains {{Code|TRUE}} when the Stored Procedure should be run. After execution the cell reference will be set to FALSE or an error message if an error occurred. | | A cell reference that contains {{Code|TRUE}} when the Stored Procedure should be run. After execution the cell reference will be set to FALSE or an error message if an error occurred. | ||
|- | |- | ||
− | | {{Code| | + | | {{Code|Connection}} |
− | | The connection | + | | The connection to use to connect to the database. This can either be the Connection ID of a workbook relational connection or a connection string. |
|- | |- | ||
| {{Code|ProcName}} | | {{Code|ProcName}} |
Revision as of 10:01, 19 June 2015
Allows a SQL Stored Procedure to be run when required (used in conjunction with XL3Link to trigger the execution)
Contents
[hide]Syntax
XL3RunSQLProc( ExcecuteSQL, Connection, ProcName, [Parameter1],..., [Parameter27])
Parameters
Parameter | Description |
---|---|
ExecuteSQL | A cell reference that contains TRUE when the Stored Procedure should be run. After execution the cell reference will be set to FALSE or an error message if an error occurred. |
Connection | The connection to use to connect to the database. This can either be the Connection ID of a workbook relational connection or a connection string. |
ProcName | The Stored Procedure to run |
[Parameter1],..., [Parameter27] | Optional - The parameter values to use for the Stored Procedure |
Examples
XL3RunSqlProc(B3, Variables!C2, C3)
When B3 is set to TRUE (via an XL3Link) then the Stored Procedure in C3 is run using the connection string specified in Variables!C2. After completion, B3 will be reset to FALSE - ready for the next update by an XL3Link. Note that to use this on XLCubed Web Edition, the XL3Link should be of type 3 (HyperLink with submit changes on web).