Difference between revisions of "XL3RunSQL"
Line 30: | Line 30: | ||
{{Code|XL3RunSql(J3,CommentData!$G$1,L3)}} | {{Code|XL3RunSql(J3,CommentData!$G$1,L3)}} | ||
− | ''When J3 is set to TRUE (via an [[XL3Link]] then the SQL statement in L3 is run using the connection string specified in CommentData!G1. After completion J3 will be reset to FALSE - ready for the next update by an XL3Link'' | + | ''When J3 is set to TRUE (via an [[XL3Link]] then the SQL statement in L3 is run using the connection string specified in CommentData!G1. After completion J3 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).'' |
==See Also== | ==See Also== |
Revision as of 16:13, 12 July 2012
Allows a SQL Statement to be run when required (used in conjunction with XL3Link to trigger the execution)
Contents
[hide]Syntax
XL3RunSQL( ExcecuteSQL, ConnectionString, SQLStatement, [QueryTableSheet], [Querytable])
Parameters
Parameter | Description |
---|---|
ExecuteSQL | A cell reference that contains "TRUE" when the SQL Statement should be run. After execution the cell reference will be set to FALSE or an error message if an error occurred. |
ConnectionString | The connection string to use when running the writeback |
SQLStatement | The SQL statement to run |
[QueryTableSheet] | Optional - Worksheet name containing query table to refresh after the SQL has run |
[QueryTable] | Optional - The name of the query table to refresh after the SQL has run |
Examples
XL3RunSql(J3,CommentData!$G$1,L3)
When J3 is set to TRUE (via an XL3Link then the SQL statement in L3 is run using the connection string specified in CommentData!G1. After completion J3 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).