Logic dictates, that you don't need a "live" connection, since a TDataSet can be "anything" which provides a TDataSet (InMem-DB, JSONDataSet etc.), but don't have a connection
Can a local dataset cache the result of a remote query automatically and reliably?
Which I think echos OP's question.
MarkMLl
Should be pretty simple to find out:
Setup a DBGrid, setup the TSQL-Trinity, setup the Datasource, connect all components according to Doc's/Wiki.
During runtime, load/display "original" Query/Data.
Use local Var of TDataSet.
Assign/Copy Queryresult or DBGrid.DataSource.DataSet to that Var
Disconnect the Connection!!
Play around with the values of that Var
Assign that Var to the DataSet-Property of the DBGrid's DataSource, and refresh.
In a nutshell (As far as i understand it): Any DB-Aware Control needs a DataSource.
it doesn't have to be a TQSLQuery-Instance!!
logic implies, that you don't need a "live" connection to a Database
EDIT: From the Sidelines: Any "long running Query" should be "run" asynchronously (or at least in its own thread).
And that would even depend what kind of Query: is it a SELECT (something comes back) or is it a CUD (Nothing coming back)