The query cannot be run until it has been designed.
This error occurs when you open the query in Solution Explorer (opening causes the query to run), but so far the query has not been designed. You must first design the query using the Query and View Designer.
To correct this error
In Solution Explorer, right-click the query and choose Design on the shortcut menu.