Creating a Query Object

The preferred way to create a Query object programmatically is to use the createQuery method of the QueryManager object. This method sets the QueryManager property of the newly created Query object automatically when the Query is instantiated.

An alternative way to create a Query object programmatically is to use the constructor in the QueryClient class. If you use this approach, then you must explicitly set the QueryManager property of the newly created object so that it references a valid QueryManager . This is required because the Query object cannot function unless it is associated with a QueryManager object.