Never, Ever Give Up!
If you really and truly want to be a published writer, you will never give up.
My first book, a family saga which I typed on a regular typewriter and sent off in a box to each publisher with another smaller box inside with the required stamps to get it back. When it began to look shabby, I retyped all 500 pages over, redoing a page every time I made a mistake. I did this a lot, since I got nearly thirty rejections before finally receiving a thin business envelope in the mail with an acceptance letter inside.
This happened right after everyone in my critique group told me publishers weren't buying historical family sagas anymore. What would have happened if I'd given up? Nothing, except that my first book wouldn't have been published.
Oh, I got plenty more rejections after that, but I just kept on writing. Fortunately when the Internet and email came into being the process of querying and sending full manuscripts out became much easier and began to find homes for all the books I'd kept right on writing.
Through the years I've met many really good writers, writers who amazed me and I wished I could write as well, who upon receiving two or three rejections decided it wasn't worth the effort. Not only did they not have the joy of seeing their book in print, but they deprived potential readers of a pleasurable few hours.
There is an old adage that says, "If at first you don't succeed, try, try again." And that's exactly what you should be doing.
No, I'm not a best selling author, but I have over twenty-five books in print and now with the advent of Kindle and other reading devices, many of those twenty-five books are now being read by new eyes.
Why do you write? First, because you have a story to tell. Second, because you hope that someday a reader will be entertained, mystified, thrilled, scared, or inspired by your words. All the more reason not to give up.
You have taken the time to put the words that have been clamoring to get out of your brain onto paper so take the time, no matter how long, to make sure they are in the best possible shape, and then send them out and keep sending them out until someone at some publishing house realizes your words need to be in print--whether it's in a regular book or an e-book.
That's the best advice I can give to any writer.