| Stonefield Query SDK |
| DataEngine.AfterDataEnvironmentCleared |
However, one drawback to this approach is that the user may change data sources if the Allow Multiple Data Sources configuration setting is True. In that case, the temporary data may not be valid for the newly selected data source, and should be recreated the next time it's required. You can close and destroy the temporary data in the DataEngine.AfterDataEnvironmentCleared script.
Parameters
A reference to the Stonefield Query Application object.
Return Value
Any value (Stonefield Query ignores the return value).
Example
Visual FoxPro
Here's an example that closes the _LOOKUPS cursor if it's open (presumably, this cursor was opened by another script). This isn't strictly required because Stonefield Query closes all opened cursors when the data source is changed, but is shown here for completeness.
lparameters toApplication as SQApplication
if used('_LOOKUPS')
use in _LOOKUPS
endif VBScript
This example tells Stonefield Query to blank the Application.Categories property when the data source is changed (this property is created and filled with information by another script).
function Main(Application) XML = "Test" on error resume next XML = Application.Categories on error goto 0 if XML <> "Test" then Application.Categories = "" end if end function
JavaScript
This example tells Stonefield Query to blank the Application.Categories property when the data source is changed (this property is created and filled with information by another script).
function Main(Application) {
try {
Application.Categories = '' ;
}
catch(e) {
}
}See Also
Scripts
| Last Updated: 02/11/2008 |