How to Terminate a DB Query In ProgressHi, All!
Got a question from one of my power users. I've seen a similar question once or twice in the community but no answers. I wanted to see if we had any thoughts on this:
"Is there a way to have a Quit function for a database query in a JMP script, so that a user can stop a query if it is hanging or taking too long? The only other option that I know of is to Force Quit JMP."
Any thoughts would be appreciated.
Best,
M
Re: How to Terminate a DB Query In ProgressThanks, again, Brian! I’ll pass this along and see what he says.
Re: How to Terminate a DB Query In ProgressIf it is a huge table, the initial time to open the table and read the variable data can be quite lengthy. I would also make sure under Preferences that Query Builder->ODBC->Run queries in the background is checked (even if not using Query Builder). Once an initial block of data is fetched, like 500 rows, then the query should appear in the running queries list. It will not show up until then.
I would also emphasize that using a Query Builder script, rather than Open Database, is going to be the more robust, performant way to do the query.
Re: How to Terminate a DB Query In ProgressOkay so a follow-up on the initial idea about using the Running Queries option. His query causes JMP to become unresponsive. Also, when the query starts to return data the menu item is disabled… could this be a problem with his query?
Re: How to Terminate a DB Query In ProgressHi Mike,
There is not a JSL option to close a query.
Brian
Re: How to Terminate a DB Query In ProgressThanks for the quick replay, Brian! I’ll pass that along.
I think he might be looking for something more programmatic. I thought there might be something in the SQL or JSL commands that would allow a user defined timeout period. Any thoughts on that option?
Though, taking your point, I guess he could use a “Main Menu(“Running Queries”)” command in a button to add the functionality.
Best,
M
Re: How to Terminate a DB Query In ProgressIf JMP is visible, you can always do View->Running Queries and issue a stop from there.
Brian