The Query could not be opened because it is not under a database connection.
You're trying to open a query that isn't under a data connection in your database project.
-
To correct this error, make sure the query is under a data connection in your database project, and make sure the data connection is open.
For more information, see Populating a Database Project.