One more post about queries and then, I promise, I'll move on. I stole this from someone and can no longer remember who, but if someone wants to take credit, I'll gladly give it. Any if someone else can state it better, that would be good, too. This is a little long winded.
First, I'm assuming your project is as good as you can make it. It's as good or better than what's on the market and it's ready to be published. I'm also assuming you want to be published by a major house and, to do that, you need an agent. And you're sending out queries and collecting rejections and wondering if you'll EVER reach your goal.
As a querying writer you have your own, individual magic number. You don't know what it is, but it is written in stone somewhere. It's the number of queries you must send out before you land that elusive agent, the one who "falls in love" with your work and then manages to get it sold for you. An agent who can't sell your work, necessitating getting another agent, is a pre-agent, and doesn't count. Only your "real" agent, the one who sells for you. When you send out the query with the magic number on it, you're set, done, reached your goal. (Until you go on to the rest of the stuff, which is just as hard, only different.)
The beauty of this theory is that you can regard each rejection as a step closer to your magic number. Another rejection? Okay, the magic number wasn't 17. A few more? Okay, it wasn't 28, or 52, or 77, or maybe not even 110. Each rejection is PROGRESS. You're getting closer to your magic number.
You may lose patience and try other routes. It may even help to get the big agent and the big publishing house if you publish something with a good small press. (Publishing with a vanity press won't help unless that's your final goal.)
Another writer, Lina Zeldovich, has a similar theory she calls Stairway to Heaven. Every rejection letter builds her stairway and gets her closer.
Either way, don't view rejection letters as marks of failure, but rather as marks of success.
I just hope my magic number isn't ten thousand.