Changing Connections Is Not Supported for Non-Empty Query Documents

Changing Connections Is Not Supported for Non-Empty Query Documents

Attempting to change the connection for a query document may result in the following error:

"Cannot change the connection for a non-empty query document"



As a result, the connection cannot be switched to another server or environment while the document contains a query or an execution is in progress.


Cause
This is the expected behavior. Changing the connection for a query document is not supported if the document already contains a query or if the query is currently being executed.


Workaround
Before changing the connection:
  1. Ensure that the current query execution has finished.
  2. If the query is still running, stop it by clicking Stop Execution on the toolbar.
  3. Once execution has completed, the connection can be changed using the Connection drop-down list.
Note: If the same query needs to be executed against another server or environment, it is recommended to open a new query document and select the required connection there.

Info
Additional Information
The ability to select a database directly within the query document, similar to the functionality available in dbForge Studio for SQL Server, is planned for future releases.